27 lines
564 B
Python
27 lines
564 B
Python
from mouse import move
|
|
from secrets import randbelow
|
|
from time import sleep
|
|
|
|
|
|
def erratic_movement(screen_width=800, screen_height=600):
|
|
"""
|
|
Moves the cursor to a random position with the screen's width and height as an upper bound
|
|
"""
|
|
move(
|
|
randbelow(screen_width),
|
|
randbelow(screen_height),
|
|
)
|
|
|
|
|
|
def main():
|
|
"""
|
|
Calls the movement function in an infinite loop, with a random delay between each call
|
|
"""
|
|
while True:
|
|
erratic_movement()
|
|
sleep(randbelow(90))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|