View Single Post
Old 11-11-2018, 01:56 PM   #2
ThomasE
Human being with feelings
 
Join Date: Aug 2009
Location: Sweden
Posts: 70
Default

This Lua script makes the edit cursor follow the mouse. Could that work? Select "Terminate instance" when you run the script again to be able to toggle on/off.

Code:
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,resolution,val = reaper.get_action_context()
  reaper.SetToggleCommandState(sectionID, cmdID, 0)
  reaper.RefreshToolbar2(sectionID, cmdID)
end

local is_new_value,filename,sectionID,cmdID,mode,resolution,val = reaper.get_action_context()
reaper.SetToggleCommandState(sectionID, cmdID, 1)
reaper.RefreshToolbar2(sectionID, cmdID)

reaper.atexit(exit) 

main()
ThomasE is offline   Reply With Quote