Skip to content

Instantly share code, notes, and snippets.

@ltpitt
Created June 7, 2023 14:19
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 ltpitt/41fa001f63cbce8b8e65c58a779211e7 to your computer and use it in GitHub Desktop.
Save ltpitt/41fa001f63cbce8b8e65c58a779211e7 to your computer and use it in GitHub Desktop.
A simple script to jiggle your mouse around
import pyautogui
import random
import time
screen_width, screen_height = pyautogui.size()
interval = 10
while True:
x = random.randint(0, screen_width)
y = random.randint(0, screen_height)
pyautogui.moveTo(x, y, duration=0.5)
time.sleep(interval)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment