1
即時尋找諮詢來調整附加的腳本。AHK中斷循環上發佈,並繼續按鍵
當xbutton2被按下循環執行和重複罰款,但我停止循環像我想要掙扎。
理想我希望儘可能快停止循環儘可能xbutton2被釋放時。
另外我想如果同時仍保持xbutton2被按壓某個鍵(或多個密鑰的指定範圍)的環跳到開始。
xbutton2向下= 1-(400毫秒)-2-(400毫秒)-3-(400毫秒)-4-(750毫秒)-5-(500毫秒) - 等
xbutton2向下和釋放之後發送3 = 1-(400毫秒)-2-(400毫秒)-3 - xbutton2釋放
xbutton2向下和x被按下後發送3 = 1-(400毫秒)-2-(400毫秒)-3 -X- 1-(400ms)-2-(400ms)等
SetNumlockState, Alwayson
#MaxThreadsPerHotkey 3
$*XButton2::
loop
{
if not GetKeyState("XButton2", "P")
break
Send {Blind} {1}
sleep 400
if (not GetKeyState("XButton2", "P")or GetKeyState("x", "P"))
continue
Send {Blind} {2}
sleep 400
if (not GetKeyState("XButton2", "P")or GetKeyState("x", "P"))
continue
Send {Blind} {3}
sleep 400
if (not GetKeyState("XButton2", "P")or GetKeyState("x", "P"))
continue
Send {Blind} {4}
sleep 750
if (not GetKeyState("XButton2", "P")or GetKeyState("x", "P"))
continue
Send {Blind} {5}
sleep 500
}
return
謝謝您的意見,我喜歡這個主意。處理可變睡眠定時器的最佳方式是什麼,因爲發送命令之間的定時會有所不同。 – user3162672
爲什麼不遵循相同的模式? 'otherlist = 400,200,730,10',然後是'stringsplit,otherlist,otherlist,'''和'Sleep otherlist%counter%'? – Dane