Skip to content

Instantly share code, notes, and snippets.

@ryu22e
Created March 12, 2021 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryu22e/99236d66a66953d3f16b2a7acee74e08 to your computer and use it in GitHub Desktop.
Save ryu22e/99236d66a66953d3f16b2a7acee74e08 to your computer and use it in GitHub Desktop.
automove_mousecursor.py

Setup

$ pip install PyAutoGUI==0.9.52
#!/usr/bin/env python
import random
import pyautogui
if __name__ == "__main__":
while True:
x = random.randint(0, 2000)
y = random.randint(0, 2000)
duration = random.randint(1, 5)
pyautogui.moveTo(x, y, duration)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment