View Single Post
Old 04-16-2017, 03:01 AM   #63
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,548
Default

suturn123,
снять выделение с айтемов длительностью больше секунды:
Code:
-- unselect items with length more that 1 second

min_length = 1

for i = reaper.CountSelectedMediaItems(0), 1, -1 do
  item = reaper.GetSelectedMediaItem(0,i-1)
  if item then if reaper.GetMediaItemInfo_Value( item, 'D_LENGTH' ) > min_length then reaper.SetMediaItemSelected( item, false ) end end
end
reaper.UpdateArrange()
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote