-
-
Save Nigh/5466483 to your computer and use it in GitHub Desktop.
一个典型的检测双键键击的脚本思路。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n:=1 | |
Return | |
~a::SetTimer, scan, -1 | |
~d::SetTimer, scan, -1 | |
scan: | |
x1 := GetKeyState("a" ,"P") | |
x2 := GetKeyState("d" ,"P") | |
If(x1 and x2) | |
{ | |
MsgBox, a and d are pressed... | |
n:=1 | |
} | |
Else | |
{ | |
n++ | |
If(n>50) | |
{ | |
MsgBox, timeout! | |
n:=1 | |
Return | |
} | |
Else | |
SetTimer, scan, -10 | |
} | |
Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment