Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试制作一个脚本,如果用户在一段时间内没有执行任何操作(键盘或鼠标),则窗口焦点会切换。
当用户空闲 30 秒时,此脚本将激活记事本:
#include <Timers.au3> while (true) $idleTime = _Timer_GetIdleTime() if $idleTime > 30000 and not WinActive("Untitled - Notepad") Then WinActivate("Untitled - Notepad") EndIf Sleep(1000) WEnd