📜  让您的计算机保持清醒的 python 程序 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:13.354000             🧑  作者: Mango

代码示例1
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