Sorry for the delay. Double-tap (or any amount of multi-click) is requested by adding a #repeat directive.
#name Rec/Over/Play
#sustain 1000
#repeat
Repeat scripts have a timeout which defaults to 1 second (1000 milliseconds). You can increase that by adding a number of milliseconds after #repeat like you see with the #sustain directive.
To act on repeat clicks add this, usually at the end.
function OnRepeat {
Stop
}
The additional clicks will be acted on as long as they happen within the timeout. As soon as 1 second passes, the script returns to normal. It is also possible to have tripple-click (and more) behavior. To do that add a limit to the #repeat.
#repeat limit 2
This means that OnRepeat will be called at most twice. The first time on double-click, and the second time on tripple-click. To know how many clicks have been received you test the clickCount variable.
function OnRepeat {
if clickCount == 1 {
Stop
}
else if (clickCount == 2) {
GlobalReset
}
}