修改以下代码增加功能每隔3分钟按一次笔记本的fn键t = 200000 #200000now = timestrftimeHMS timelocaltime#local timedef sleep_timehour min sec return hour 3600 + min 60 + secsecond = sleep_time0 3 0while now t timeslee
import pyautogui import time
t = '200000' #20:00:00 now = time.strftime('%H%M%S', time.localtime())#local time
def sleep_time(hour, min, sec): return hour * 3600 + min * 60 + sec
second = sleep_time(0, 3, 0) while now < t: time.sleep(second) pyautogui.press('fn') pyautogui.move(-2,2)

原文地址: http://www.cveoy.top/t/topic/imto 著作权归作者所有。请勿转载和采集!