【发布时间】:2013-11-23 04:39:34
【问题描述】:
这应该很容易! I've checked out this thread,但没用。
我似乎无法使用热键跳出循环。这个想法是您可以使用单个热键启动和停止循环过程。
似乎timeron 的值一旦开始就永远不会进入循环。
这是一个示例脚本:
#singleinstance force
timeron = 0
return
!f7::
if(timeron){
timeron = 0
msgbox Okay, the loop is off.
}else{
timeron = 1 ;if this is not set to one, the loop will not begin
msgbox Turning on the loop.
gosub, STARTLOOPING
}
RETURN
STARTLOOPING:
;do this over and over
loop{
if(!timeron)
break
;now wait for the right length of time before continuing the loop
msgbox, The loop yet continues....
Sleep, 5000
if(!timeron)
break
}
RETURN
我在这里错过了什么?
【问题讨论】:
标签: loops autohotkey