Python 自动化脚本:定时按下笔记本 Fn 键
import\ pyautogui\nimport\ time\n\nt\ =\ '200000'\ #20:00:00\nnow\ =\ time.strftime('%H%M%S',\ time.localtime())#local\ time\n\ndef\ sleep_time(hour,\ min,\ sec):\n\treturn\ hour\ *\ 3600\ +\ min\ *\ 60\ +\ sec\n\nsecond\ =\ sleep_time(0,\ 3,\ 0)\nwhile\ now\ <\ t:\n\ttime.sleep(second)\n\tpyautogui.press('fn')\n\tpyautogui.move(-2,2)
原文地址: https://www.cveoy.top/t/topic/p4tx 著作权归作者所有。请勿转载和采集!