Last active
October 28, 2023 05:58
-
-
Save cooliscool/17aa92fa1e606a977c043c5e2ecb3e6b to your computer and use it in GitHub Desktop.
Mouse Jerk π
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyautogui | |
import random | |
import time | |
while True: | |
current_x, current_y = pyautogui.position() | |
# Generate random x and y coordinates around the current position | |
new_x = current_x + random.randint(-5, 5) | |
new_y = current_y + random.randint(-5, 5) | |
# Move the mouse to the new position | |
pyautogui.moveTo(new_x, new_y, duration=random.randint(0, 10)/10.0) | |
# Pause for a short duration before the next movement | |
time.sleep(random.randint(0, 10)/10.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment