import ctypes
import time
from random import randint
end_time = time.time() + 3604
while time.time() < end_time:
random_sleep = randint(2, 9)
random_position_1 = randint(300, 800)
random_position_2 = randint(100, 400)
time.sleep(random_sleep)
ctypes.windll.user32.SetCursorPos(random_position_1, random_position_2)
ctypes.windll.user32.mouse_event(0x800, 0, 0, 5, 0)
ctypes.windll.user32.mouse_event(2, 0, 0, 0, 0)
ctypes.windll.user32.mouse_event(4, 0, 0, 0, 0)
time.sleep(random_sleep)
ctypes.windll.user32.mouse_event(2, 0, 0, 0, 0)
ctypes.windll.user32.mouse_event(4, 0, 0, 0, 0)
time.sleep(random_sleep)
ctypes.windll.user32.SetCursorPos(random_position_1, random_position_2)
ctypes.windll.user32.mouse_event(0x800, 0, 0, -5, 0)