因此,我想检查某些应用程序是否存在。
如果是这样,并且在4.5分钟内没有输入,请切换到该应用并执行一些任务。
基本上是AFK作弊者。
这是我到目前为止所拥有的:
#SingleInstance force
#Persistent
settimer, idleCheck, 1000; check every second
return
idleCheck:
if WinExist(App Name with 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
现在很明显这是行不通的,因为否则我不会在这里发布。
这个问题很简单,但我找不到答案。
提前致谢。
WinExist是一个函数,函数参数是表达式...
在表达式中,您需要"
在字符串周围使用双引号,而%
在变量周围则不需要
您还需要在分号前留一个空格以使用注释
#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
希望能帮助到你
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句