Hey there,
I´m writing a script (via macros...I´m not yet into java:) wich as the first step has to contain, that the selected tracks need to be set to "waveform" in the trackview menu.
As there is now menu click about this I assume a good way to do this is by picking the UI Element with "Open & Select Item in Popup Menu" and set it to "waveform"
My problem is that I dont really get how to do it genereic so that it`ll always work to the selected tracks..
I know that in the macro I can change the UI Element between "exactly the track that I picked" or "10.Group"" " or "10.Group" Sometimes it works but I often get the message "Could not open popup menu".
So what exactly stands that "10.Group" and the "10.Group"" " for? How can I say "Click that button on the track that I selected!" ?
Thanks in advance
Stephan
- samuel henriques @samuel_henriques
Hey Stephan,
It's actually clicking "that button on the track that you selected", but that track is "10.Group", so track 10 on the list.
Looks like you are going to need to start changing stuff to javaScript. :)
Don't be scared, just convert the macro to javaScript, and add bits as code or create new actions and copy as script . Keep the same order and you should be fine.
For the parts you really need a script, just add it to the order
So, for tis particular script, you would take the macro action as script,
sf.ui.proTools.mainWindow.groups.whoseTitle.is("Audio 45 - Audio Track ").first.popupButtons.whoseTitle.is("Track View selector").first.popupMenuSelect({ menuPath: ["waveform"], });
and replace what identifies a particular track, with
selectedTrack
:sf.ui.proTools.selectedTrack.popupButtons.whoseTitle.is("Track View selector").first.popupMenuSelect({ menuPath: ["waveform"], })
Let me know if this makes sense.
- SStephan Vester @Stephan_Vester
Hey samuel,
Haha, I knew that the day where I have to check the script might come quicker than I want..
Thanks! Yes, that makes sense...It works with one selected track but not with multiple. Should I script "opt+shift" modifier to simulate the ProTools shortut (if so.. how exactly?) or is there a better/easier way (wich I assume:)
Thank you!
samuel henriques @samuel_henriques
I'm away from the computer now.
You can add the shift and option, in the extra options in the macro action. And when you copy as script it will be there.- SStephan Vester @Stephan_Vester
Hi,
thanks. Of course...
That helps!Thanks again
Cheers
Stephan