2020-07-28 13:24:50 +02:00
|
|
|
from mouse import get_position, move
|
|
|
|
from random import randint
|
2020-07-28 12:42:19 +02:00
|
|
|
from time import sleep
|
|
|
|
|
|
|
|
|
2020-07-28 13:24:50 +02:00
|
|
|
def erratic_movement(screen_width, screen_height):
|
|
|
|
x, y = get_position()
|
|
|
|
move(
|
|
|
|
x + randint(-100, 100) % screen_width, y + randint(-100, 100) % screen_height,
|
|
|
|
)
|
2020-07-28 12:42:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2020-07-28 13:24:50 +02:00
|
|
|
screen_width = 1920
|
|
|
|
screen_height = 1080
|
2020-07-28 12:42:19 +02:00
|
|
|
while True:
|
2020-07-28 13:24:50 +02:00
|
|
|
erratic_movement(screen_width, screen_height)
|
|
|
|
sleep(randint(2, 10))
|
2020-07-28 12:42:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|