Answers for "python program to keep your computer awake"

1

python program to keep your computer awake

import time
import mouse
import random
while True:
    get_position_of_mouse = mouse.get_position()
    time.sleep(10)
    new_position = mouse.get_position()
    go_to = random.randint(10,300)
    if get_position_of_mouse == new_position:
       mouse.move(go_to,go_to)
#if you know how to check if the user is typing something but not using mouse you can 
#add that feature also
Posted by: Guest on September-24-2021

Code answers related to "python program to keep your computer awake"

Python Answers by Framework

Browse Popular Code Answers by Language