Hello
How can I connect this two actions?
action(41305)Item edit: Trim left edge of item to edit cursor
only left of the middle of the selected item
action(41311)Item edit: Trim right edge of item to edit cursor
only right of the middle of the selected item
Code:
-- curpos = reaper.GetCursorPosition()
-- start_pos = reaper.GetMediaItemInfo_Value(it, 'D_POSITION')
-- len = reaper.GetMediaItemInfo_Value(it, 'D_LENGTH')
-- curmid = start_pos + len/2
if curpos<curmid then
--Item edit: Trim left edge of item to edit cursor
reaper.Main_OnCommand(41305,1)
else
--Item edit: Trim right edge of item to edit cursor
reaper.Main_OnCommand(41311,1)
Thank you very much