From 9172cced293a2fd4ea5e592775c5b211e3087b54 Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 28 Jul 2020 22:30:55 +0200 Subject: [PATCH] Document the functions --- proarbeit.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/proarbeit.py b/proarbeit.py index 5a64a75..6ff12a3 100644 --- a/proarbeit.py +++ b/proarbeit.py @@ -1,15 +1,23 @@ -from mouse import get_position, move +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: