所以我有一个运行良好的脚本。
这里是:
#SingleInstance force
#Persistent
settimer, idleCheck, 1000 ; check every second
return
idleCheck:
if WinExist("App Name with or without Spaces") ; if app is running
{
if(A_TimeIdle >= 270000) ; and there was no input in 4.5 min
{
WinActivate ; switch to that app
sendInput z ; and perform an action
}
}
return
Run Code Online (Sandbox Code Playgroud)
但是一旦盖子关闭(不是在睡眠中),它就不会因为显而易见的原因而出现。
有没有办法在关闭时做一些事情,或者“欺骗”操作系统认为盖子在关闭时是打开的。
希望这是有道理的。
解决方案不必仅在 .ahk 中。我只需要脚本工作,使用它的帮助并不重要。
提前致谢。
autohotkey ×1