Hi people!! I made a simple script, to put in shift+space and slow down the playrate 50%, like protools. Super handy to finnese synchronize Foley and bits with the video, or viceversa. But i can make the thing don't spam the undo list with "set project playspeed". I tried all the methods for no undo i can find in the forum, but with no result. The script itself it's not the culprit, is that action-command-api, allways appears. The rest of the things in the script, and the script itself, don't appear in the undo. I put below a version of the script with some of the shit i tried commented... if i active the undo blocks, the "set project playspeed" wont appear, but appears an undo for the script itself (Slow Play), and i don't want that either. it's a play action, i want it whitout undo points. Thanks in advance, if someone can help me, i'll be gratefull.
Code:
function Main ()
--reaper.Undo_BeginBlock()
reaper.CSurf_OnPlayRateChange(0.5)
reaper.Main_OnCommand(40044,0)
--reaper.Undo_EndBlock("Slow play", -1 )
end
reaper.defer(Main)
--reaper.Undo_OnStateChange("No Undo Point")
--reaper.CSurf_FlushUndo(true)