If F13 is pressed short (max. 50ms) it skips the track
If F13 is pressed long (more than 100ms) it plays the previous track
Can anyone help? I only could make it like so (It's kind of example code from the Corsair Forum and not my own code):
If F13 is pressed twice fast, it skips the track,
If F13 is pressed twice slow, it plays the previous track.
Can anyone help?
This is the code:
-------------------------------------------------------------
Code: Select all
global wasHeld:=false
F13::
if !wasHeld
{
Clock:=A_TickCount
}
wasHeld:=true
return
F13 Up::
if (A_TickCount >= Clock + 500)
{
;print("h")
Send, {Media_Prev}
}
else {
;print("o")
Send, {Media_Next}
}
wasHeld:=false
return