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.
我用 Autoit 创建了一个 GUI 程序。
我想在我的程序中添加一个空闲超时,以便在超时后自动关闭(类似于 InputBox 和 MsgBox)。但它别无选择...
有什么办法吗?
使用AdlibRegister
GuiCreate() AdlibRegister("MyTimeoutFunc", 10000); runs every 10s While True Sleep(100) Wend Func MyTimeoutFunc() Exit EndFunc
或使用TimerInit和TimerDiff
GuiCreate() $sTimer = TimerInit() While TimerDiff($sTimer) < 10000 ;Runs for 10s Sleep(100) Wend Exit