Script Edit
Hi,
I've got this script from another thread that makes my edit and play cursor follow mouse cursor but I can't make it obey snap by adding actions. It there a way to modify the script so it obeys snap?
function main()
reaper.BR_GetMouseCursorContext()
local pos = reaper.BR_GetMouseCursorContext_Position()
if pos > -1 then
reaper.SetEditCurPos2(0, pos, false, false)
end
reaper.defer(main)
end
function exit()
local is_new_value,filename,sectionID,cmdID,mode,resolut ion,val = reaper.get_action_context()
reaper.SetToggleCommandState(sectionID, cmdID, 0)
reaper.RefreshToolbar2(sectionID, cmdID)
end
local is_new_value,filename,sectionID,cmdID,mode,resolut ion,val = reaper.get_action_context()
reaper.SetToggleCommandState(sectionID, cmdID, 1)
reaper.RefreshToolbar2(sectionID, cmdID)
reaper.atexit(exit)
main()
Here's my custom action.
Action:Toggle arm of next action
Item: Split item at edit or play cursor
Script: Edit Cursor Follors Mouse Cursor.lua
Thanks,
|