楼主:
FF14 (太十四)
2013-09-21 07:59:25我是想用F10启动loop
loop跑到一半如果要临时中止的话
就按F12来停止
loop的内容大约就是鼠标移到某个位置然后双点击, 然后键盘依序点几个键
$F10::
Loop 100
{
If GetKeyState("F12", "T")
Break
Sleep 500
MouseMove 810, 625
Sleep 700
Click 2
Sleep 3000
Send 5
Sleep 1700
Send 4
Sleep 1700
Send {-}
Sleep 1700
Send 0
Sleep 3000
Send 6
Sleep 3000
Send 6
Sleep 3000
}
Return
不过这样写按下F12后却毫无反应, loop还是继续跑
请问要怎么写才能"按个热键让loop直接停止"呢?
作者: ScorAlan (Stop) 2013-09-21 14:03:00
每个Sleep之前或之后增加侦测点,如果已记录F12按下则break又或是隔几个Sleep才去设侦测点。看你要马上停止还是等一下在停止