Autohotkey同一个键开关 同键跳出循环
1、例1:
esc::
sleep 100
loop
{
send a
KeyWait,esc,D T1 ;;表示等待esc 在3秒内被按下
if (ErrorLevel == 1)
{
continue
}
else
break
}
Return
2、例2:
k :=0
esc::
k := 1-k
if (k == 1)
settimer, aaa, 1000
else
settimer, aaa, off
Return
aaa:
{
send a
}
return
3、例3:
~$a::
if ONOFF := ! ONOFF
SetTimer, KeyPress, 1000
else
SetTimer, KeyPress, Off
Return
KeyPress:
Send, a
Return
4、例4:
^k::
loop
{
pause
send a
sleep 1000
}
return
esc::
pause
return

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
                                阅读量:46
阅读量:45
阅读量:85
阅读量:167
阅读量:44