作者fossil313 (阵雨)
看板EzHotKey
标题Re: [AHK-] 侦测到某键就中断程序
时间Sun May 22 09:14:28 2011
※ 引述《GalaxyDemon (红色飞鱼)》之铭言:
: 请问一下我现在的AHK有用到
: KeyWait, LButton, D
: 只要按滑鼠左键就能继续接下来的指令
: 如果我想要在这个地方判断下一个按键
: 这时按一下左键就继续指令
: 如果按一下右键就中断
: 要怎麽写呢?谢谢
用getkeystate写的话
loop
{
if getkeystate("lbutton") = 1
break
else if getkeystate("rbutton") = 1
exit
sleep, 70
}
return
或是再加一个右键热键
a = 1
keywait, lbutton, D
a = 0
return
~rbutton::
if a = 1
{
exit
a = 0
}
return
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.117.0.20
※ 编辑: fossil313 来自: 59.117.0.20 (05/22 15:54)
1F:推 GalaxyDemon:谢谢,我先试试看 05/25 01:56