Document the functions

This commit is contained in:
coolneng 2020-07-28 22:30:55 +02:00
parent 9c6915429c
commit d62667a652
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 7 additions and 1 deletions

View File

@ -1,15 +1,21 @@
from mouse import get_position, move from mouse import move
from secrets import randbelow from secrets import randbelow
from time import sleep from time import sleep
def erratic_movement(screen_width, screen_height): 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( move(
randbelow(screen_width), randbelow(screen_height), randbelow(screen_width), randbelow(screen_height),
) )
def main(): def main():
"""
Calls the movement function in an infinite loop, with a random delay between each call
"""
screen_width = 800 screen_width = 800
screen_height = 600 screen_height = 600
while True: while True: