View Single Post
Old 10-27-2020, 11:08 AM   #2
Yanick
Human being with feelings
 
Yanick's Avatar
 
Join Date: May 2018
Location: Moscow, Russia
Posts: 406
Default

One way or another?
PHP Code:
    
    t 
= {}
    
count_sel_tracks reaper.CountSelectedTracks(0)
    if 
count_sel_tracks == or count_sel_tracks 16 then return end
    
for i=0count_sel_tracks-do
      
local track_for_name reaper.GetSelectedTrack(0,i)
      
_name_of_sel_track reaper.GetSetMediaTrackInfo_Stringtrack_for_name'P_NAME'0false)
      
string_track_length string.len(name_of_sel_track)
      if 
string_track_length 22 then
        name_of_sel_track 
string.sub(name_of_sel_track016) ..
        
'...'..string.sub(name_of_sel_trackstring_track_length-4string_track_length)
      elseif 
string_track_length == 0 then
        name_of_sel_track 
"Track untitled "..i+
      end
      
if count_sel_tracks-1 then
        table
.insert(t,name_of_sel_track .. ',')
      else
        
table.insert(t,name_of_sel_track)
      
end
    end
    
    inputs_names 
table.concat(t)
  
    
local retvalretvals_csv reaper.GetUserInputs('Show tracks names'count_sel_tracksinputs_names'')
  
    if 
retval then
      
return
    else return 
end 
__________________
My repository | Donation

Last edited by Yanick; 10-27-2020 at 12:17 PM.
Yanick is offline   Reply With Quote