MultiPress(Max=-1)
{
Presses := 1
KeyWait, %A_ThisHotkey%
Loop
{
KeyWait, %A_ThisHotkey%, D T0.25
If (ErrorLevel || (Presses >= Max && Max > 0))
Break
Presses++
KeyWait, %A_ThisHotkey%
}
Return Presses
}
a::
P := MultiPress()
MsgBox Pressed %A_ThisHotkey% %P% times!
Return
No comments:
Post a Comment