Skip to content

Instantly share code, notes, and snippets.

@Nigh
Last active December 16, 2015 16:49
Show Gist options
  • Save Nigh/5466483 to your computer and use it in GitHub Desktop.
Save Nigh/5466483 to your computer and use it in GitHub Desktop.
一个典型的检测双键键击的脚本思路。
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