I'd like to create a script with triple actions for a single key (left Alt): single tap, double tap and hold. I know there are many threads about this already, but the action I want for holding the button is a bit different and I simply don't know how to do that part, so I'd appreciate some help.
This is what I want:
Single tap: left click
Double tap: type "ABCD"
Hold: default behavior of left Alt when holding it, for example using it for Alt codes, such as Alt+64 for typing @
The code I have so far for the single tap and double tap:
Code: Select all
LAlt::
KeyWait, LAlt
KeyWait, LAlt, D T0.2
if ErrorLevel
{
DllCall("SetCursorPos", "int", 1603, "int", 942)
MouseClick, L
return
}
else
{
Playspeed:=2
Loop, 1
{
SetTitleMatchMode, 2
CoordMode, Mouse, Screen
Send, ABCD
Sleep, % 400 //playspeed
}
return
}
return