Skip to content

Instantly share code, notes, and snippets.

@TimoReusch
Created January 18, 2022 18:00
Show Gist options
  • Save TimoReusch/2a419ffd1a35c84e759b4b80e545d20b to your computer and use it in GitHub Desktop.
Save TimoReusch/2a419ffd1a35c84e759b4b80e545d20b to your computer and use it in GitHub Desktop.
A quick, little Python-Script, that moves your mouse around and keeps your PC awake.
import pyautogui
while True:
pyautogui.moveRel(0,50, duration = 1)
pyautogui.moveRel(0, -50, duration = 1)
@TimoReusch
Copy link
Author

To terminate, move the courser to the top left corner.

You need to have PyAutoGui installed (can be done via pip using pip install pyautogui).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment