Created
July 17, 2021 17:02
-
-
Save gridhead/70aab52a25d2e089bb7aff8b9d67f6cc to your computer and use it in GitHub Desktop.
Reposition the cursor to new random location every after a random duration
This file contains hidden or 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
| from random import randint | |
| from sys import exit | |
| from time import sleep | |
| #from pyautogui import moveTo, FAILSAFE | |
| import pyautogui | |
| pyautogui.FAILSAFE = False | |
| if __name__ == "__main__": | |
| print(" * Passive Mode") | |
| while True: | |
| try: | |
| xpos, ypos, intr = randint(1, 1919), randint(1, 1079), randint(10, 60) | |
| print(" * " + str(intr) + "s [" + str(xpos) + "," + str(ypos) + "]") | |
| pyautogui.moveTo(xpos, ypos) | |
| sleep(intr) | |
| except KeyboardInterrupt: | |
| print(" * Leaving passive mode...") | |
| exit(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment