proarbeit/proarbeit.py
2020-07-28 22:30:55 +02:00

30 lines
630 B
Python

from mouse import move
from secrets import randbelow
from time import sleep
def erratic_movement(screen_width, screen_height):
"""
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
"""
screen_width = 800
screen_height = 600
while True:
erratic_movement(screen_width, screen_height)
sleep(randbelow(90))
if __name__ == "__main__":
main()