I'd like to solo safe the Aux Track that is created "MX Stems 1 Bus" - possible?

- Christian Scheuer @chrscheuer2020-01-04 21:06:44.049Z
Hi Jon,
Can you copy/paste the script code in here instead?
Christian Scheuer @chrscheuer2020-01-04 21:08:05.896Z
But yes, generally this is how to solo safe the selected track:
sf.ui.proTools.selectedTrack.buttons.whoseTitle.is('Solo').first.mouseClickElement({ isCommand: true, });
- In reply tochrscheuer⬆:JJon Shamieh @Jon_Shamieh
I get this when I try to paste the code:
Christian Scheuer @chrscheuer2020-01-04 21:15:23.100Z
Oh wow interesting!
CC'ing the forum developer @KajMagnus / @Kaj_Magnus_LindbergDo you also get this error if you wrap the code in
```
lines?
Ie. the best way to paste code is to put a line of three back ticks```
, then the code, and then follwed by another line of 3 back ticks```
- JJon Shamieh @Jon_Shamieh
Yes, same error when wrapped.
- JJon Shamieh @Jon_Shamieh
Basically I am trying to group and assisgn to new bus as output on selected tracks and not sure I'll be able to do this becuase once a VCA is created or a Bus is created as new track, the tracks are no longer selected so it breaks I think...
So far I have this, but I think it breaks in that gap between the new Bus and VCA creation, not sure how to get around it.
Christian Scheuer @chrscheuer2020-01-05 12:26:31.531Z
Before that last paragraph (before assigning the group) I think you'll need to insert this, which will refresh SoundFlow's track cache:
sf.ui.proTools.mainWindow.invalidate();
And yes Pro Tools also has a bug in which newly created tracks are not selected correctly.
You might want to also insert this code after the Disappear action:sf.keyboard.press({ keys: 'p, semicolon' });
- JJon Shamieh @Jon_Shamieh
Thanks will try. Thnk the p, semicolon code will work for all selected or just one track? seems like it'll just go to one track above newly created... I'd have to probably "find track" and put something in a batch rename in order to find the tracks I am guessing.
Christian Scheuer @chrscheuer2020-01-06 07:16:22.496Z
Yea sorry was typing this away from my computer / PT.
You can also try something like this:
This will force click with the mouse on the title of the first selected track.
It might trick PT into understanding what's selectedsf.ui.proTools.selectedTrack.titleButton.mouseClickElement();
- JJon Shamieh @Jon_Shamieh
I've actually got it working fairly consistently but it does fail when there's a lot of tracks selected:
Christian Scheuer @chrscheuer2020-01-06 19:02:32.343Z
Great stuff! Hm, it's almost impossible to help with the script though when we can't copy/paste.
I'm gonna try to get us some help for this asap.Christian Scheuer @chrscheuer2020-01-06 19:06:16.543Z
I've logged the forum bug here:
https://www.talkyard.io/-311/potential-bug-pasting-code-gives-error-about-having-too-many-linksHopefully we can address this asap so I can get my hands on your code and try it out.
The first things I notice are towards the end.
The "p" keystroke I'm not sure how behaves right after having created new tracks. Another thing that might be worth mentioning is the mouse click simulation right after where we hold down command. This would only work for 1 track, or else both Alt, Shift and Command should be held (if you're trying to solo safe more than one track).But again I'm not entirely sure how far you get in the script when it breaks with many tracks - and I can't really test it yet without having access to the code. So let's see if @KajMagnus can help us out with the code sharing :)
- JJon Shamieh @Jon_Shamieh
Cool. Yeah I am only solo safe-ing the one Bus so thats why the "p" command works for me. I'll try to email you a copy of the script.
- JIn reply toJon_Shamieh⬆:Jon Shamieh @Jon_Shamieh
Hi, this command stopped working fully - it used to change all the outputs of the created tracks, but it's only doing the top track now. Not sure if I need to build in a "wait" command? Any idea?
I'd also like to convert the Aux track (MX Stems 1 Bus) to a Routing Aux within the command - any idea how to do that? The attached .rtf is the code I am referring to.
stems.rtf (9.91 kB)
- JJon Shamieh @Jon_Shamieh
I've attached the error in this script where it doesn't bus the tracks to the newly created Aux. Any ideas?
soundflow.20200803.main.log (220.11 kB)
Christian Scheuer @chrscheuer2021-03-05 11:52:58.398Z
Hi John,
It's hard to take up this old thread due to a couple of problems:
- Generally, it's better to open up a new thread after one is closed. Otherwise it looks like the issue here is solved.
- It's hard to help when all code is only shown as images.
Please check this tutorial for how to quote code in the SoundFlow forum, so that it displays in a readable format:
But even better, use the Script Help workflow to create a new thread, filling out the details.
That will give us both logs and the script in question - see the workflow here:
- PIn reply toJon_Shamieh⬆:Paul Tidbury @Paul_Tidbury
I'm looking to do something very similar but much more simplified. I have a macro on my surface setup to create a new stereo aux in Pro Tools using one of the prebuilt actions. I now want to alter it so that the new bus is created with solo safe active. I see the code solution that Christian has given at the top of this thread but can't work out how to add it to my macro so that it works.
I was initially hoping to achieve what I wanted with simple actions. Ie. keyboard modifier - hold command and then another following for Set Track Solo. For my own understanding, why doesn't this work?
All help appreciated!