Skip to content

Instantly share code, notes, and snippets.

@Davidblkx
Created October 14, 2020 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Davidblkx/1b5320c45adc00615e113cc58b59019b to your computer and use it in GitHub Desktop.
Save Davidblkx/1b5320c45adc00615e113cc58b59019b to your computer and use it in GitHub Desktop.
python script to keep pc alive
# /bin/python
import mouse
import time
(X, Y) = mouse.get_position()
mov = False
while True:
X = X + 1 if mov else X - 1
mov = not mov
mouse.move(X, Y)
mouse.click()
time.sleep(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment