I'd appreciate your assistance.
The script below works properly when it is run as a native AHK script, allowing to set the same shortcut (e.g. #s) to send one command when single pressing, and another when pressed twice.
I tried to implement this script into Fastkeys as a shortcut and a start menu item, being unsuccessful with my implementation in both cases.
How can I run such a script from Fastkeys?
Thank you!
Carlos
Code: Select all
#MaxThreadsPerHotkey, 2
KeyPress := 0, running := False
#s::
KeyPress++
If (running = True) {
Return
}
running := True
While (A_TimeSinceThisHotkey < 300) {
If (KeyPress > 1) {
MsgBox, Two times
KeyPress := 0, running := False
Return
}
}
MsgBox, One time
KeyPress := 0, running := False
Return