Hi Ifwind,
I'm not very good at hotkeys, but I hope I can direct you into the right direction.
Please have a look at the manual. Look for SetTimer, GetKeyState, EnvSub
MY first guess was:
Code:
$Numpad0:: DownTime = %A_Now%
$Numpad0 UP::
EnvSub, DownTime, %A_Now% , S
MsgBox, DownTime = %DownTime%
return
But that didn't work,
So I tried this
Code:
$Numpad0::
DownTime = %A_Now%
SetTimer, WatchKey, 100
return
WatchKey:
Down := GetKeyState(Numpad0)
If not Down
{
UpTime = %A_Now%
EnvSub, DownTime, %UpTime% , S
MsgBox, DownTime = %DownTime%
SetTimer, WatchKey, Off
}
return
And that didn't work either.
I'm sorry I didn't found a solution for you, but maybe some other user stroles by and points out the mistakes I've made.