The working code in ahk 1.1:
Code: Select all
F7::
KeyWait, F7, T0.2 ; Long press
if (Errorlevel)
{
msgbox, 1
return
}
else ; Single press
{
msgbox, 2
return
}
return
My try to get it running at ahk 2.0:
Code: Select all
F7::
KeyWait "F7", "T02" ; Long press
if (0)
{
msgbox 1
return
}
else ; Single press
{
msgbox 2
return
}
return