Skip to content

Instantly share code, notes, and snippets.

@magentapenguin
Created December 3, 2024 22:15
Show Gist options
  • Save magentapenguin/d6d93152d7c31e3f4e8200c72b71ae4e to your computer and use it in GitHub Desktop.
Save magentapenguin/d6d93152d7c31e3f4e8200c72b71ae4e to your computer and use it in GitHub Desktop.
import mouse, random, keyboard
RNG_X = 200
RNG_Y = 200
def stop():
global running
running = False
raise KeyboardInterrupt
keyboard.add_hotkey("ctrl+alt+\\", stop, suppress=True)
running = True
while running:
x = random.randint(-RNG_X, RNG_X)
y = random.randint(-RNG_Y, RNG_Y)
mouse.move(x, y, False, 0.2)
mouse.click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment