- if key is pressed, execute action 1
- if key is held for more than 2 seconds, execute action 2 instead
I have the first part of the code working but I can't figure out the second part:
Code: Select all
Send, #1
return
Thanks for your help
Code: Select all
Send, #1
return
Code: Select all
#SingleInstance force
$a::
aDown:=A_TickCount
Keywait a, T 0.5 ; timeout
Duration:=(A_TickCount-aDown)
If (Duration<300)
Send #1
Else
Send #!1
Return
Code: Select all
$a::
KeyWait, a, T2
If ErrorLevel ; timed out
Send, #!1
Else
Send, #1
Return
Users browsing this forum: Google [Bot] and 345 guests