Old 10-02-2019, 12:56 AM   #1
semikid
Human being with feelings
 
Join Date: May 2015
Location: Los Angeles, CA
Posts: 325
Default "Unselect tracks-with the name of ___"

I'm looking for a script to make or someone make me one that I can interchange what I want the name in the track to be unselected.

For example: "unselect tracks with the name bass" OR "unselect tracks with the name guitar"

etc.
semikid is offline   Reply With Quote
Old 10-02-2019, 01:32 AM   #2
uncleswede
Human being with feelings
 
Join Date: Feb 2015
Posts: 826
Default

If you have the SWS extension installed, you can do this with CYCLE ACTIONS...

Create a new cycle action named, for example, "Unselect Bass" with an action as follows:

CONSOLE -sBass*

This will unselect all tracks whose name begins with 'Bass' (or 'bass')

Once you created and applied this cycle action it will appear as an action in your Action List named "Unselect Bass" :-)
uncleswede is offline   Reply With Quote
Old 10-07-2019, 02:33 PM   #3
semikid
Human being with feelings
 
Join Date: May 2015
Location: Los Angeles, CA
Posts: 325
Default

hey that helps, but not for the children tracks specifically under the parent folders name. I need to unselect all the tracks underneath that track name as well. Not just the parent folder/track. ALL of them.

More of a "select all tracks, but "fx buses" tracks (and their children folders/tracks)

Last edited by semikid; 10-07-2019 at 02:43 PM.
semikid is offline   Reply With Quote
Old 10-07-2019, 02:55 PM   #4
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,442
Default

How about something like this?, If it does what you want you could change the find name and save as another script,.
Code:
-- Unselect tracks with specific name

local find = 'Guitar' -- non-case sensitive

reaper.PreventUIRefresh(1)
for i = reaper.CountSelectedTracks(0)-1,0,-1 do 
  local track = reaper.GetSelectedTrack(0, i)
  local _,name = reaper.GetTrackName(track, '')
  if string.lower(name) == string.lower(find) then    
    reaper.SetTrackSelected(track, false)
  end   
end
reaper.PreventUIRefresh(-1)
Removed Undo code, REAPER doesn't seem to support undo for selected track?

Last edited by Edgemeal; 10-07-2019 at 03:07 PM.
Edgemeal is offline   Reply With Quote
Old 10-08-2019, 11:22 AM   #5
semikid
Human being with feelings
 
Join Date: May 2015
Location: Los Angeles, CA
Posts: 325
Default

Thanks for the help Edgemeal. Right now it only seems to be unselecting the parent fx bus track and not the children.
semikid is offline   Reply With Quote
Old 10-08-2019, 03:10 PM   #6
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,442
Default

Quote:
Originally Posted by semikid View Post
Thanks for the help Edgemeal. Right now it only seems to be unselecting the parent fx bus track and not the children.
Well the script just unselects any selected track that has a matching name, but I'm guessing what you really want is, all child tracks of the matching parent name get also get unselected?

Also, what is supposed to happen if a child track is selected and has the matching name but the parent doesn't?

You might want to update your original post so its more clear to others.

Last edited by Edgemeal; 10-08-2019 at 03:37 PM.
Edgemeal is offline   Reply With Quote
Old 10-08-2019, 04:21 PM   #7
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,351
Default

I have a script on ReaPack called Select tracks by name... if I get a chance, I'll try to add an "inverse" mode that should do what you need.
Lokasenna is online now   Reply With Quote
Old 11-08-2019, 09:02 PM   #8
semikid
Human being with feelings
 
Join Date: May 2015
Location: Los Angeles, CA
Posts: 325
Default

Quote:
Originally Posted by Lokasenna View Post
I have a script on ReaPack called Select tracks by name... if I get a chance, I'll try to add an "inverse" mode that should do what you need.
Ha! yes i love that script! I was thinking exactly that! "what if this script could inverse?"

That would be sweet if possible! LMK!
semikid is offline   Reply With Quote
Old 11-08-2019, 09:09 PM   #9
foxAsteria
Human being with feelings
 
foxAsteria's Avatar
 
Join Date: Dec 2009
Location: Oblivion
Posts: 7,151
Default

Or just use the console command -s trackname

You don't need to use Cycle Actions to run console commands, unless you want to combine them with other commands. You could e.g. select your tracks with the above command and add the sws action "unselect children of selected folder."
__________________
Myyy Wyyyrd Music
foxAsteria is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.