I pieced together a rough script that moves to the next song when a widget with a handle of Next is pressed. It adds a 500ms check for the press of the widget, and ignores any additional presses that happen within that 500ms time.
Perhaps you can adapt it for your use.
Var
Next : Widget
Done : Boolean
Start : Ramp
On WidgetValueChanged(newValue : double) from Next
If Done == false then
If newValue > 0 then
Done = True
SetGeneratorLength(Start, 500)
EnableGenerator(Start, true)
SetTimersRunning(true)
NextSong()
End
End
End
On GeneratorEndCycle(x : integer) from Start
Done = false
End