I'm trying to make a shortcut which does the above, I've got as far as this:
sf.ui.proTools.selectedTrack.popupButtons.whoseTitle.is('Track View selector').first.elementClick();
This opens the pop up and the next thing I would usually do is type 'pan' to move to the pan.
I've tried to add a script that types pan, but it doesn't work.
Is there a more elegant way to do this?
Thanks
- Christian Scheuer @chrscheuer2019-09-10 03:15:15.297Z
Hi @Martin_Pavey.
The way to do this would be to use the
popupMenuSelect
action, like this:sf.ui.proTools.selectedTrack.popupButtons.whoseTitle.is('Track View selector').first.popupMenuSelect({ menuPath: ['pan'] });
In fact we have an even shorter way of doing it with the trackDisplaySelect action which wraps the above call:
sf.ui.proTools.selectedTrack.trackDisplaySelect({ displayPath: ['pan'] });
- MMartin Pavey @Martin_Pavey
Very nice, thanks Christian.
I added a return at the end to make it work on a track routed to a surround bus to show the L lane.sf.ui.proTools.selectedTrack.trackDisplaySelect({
displayPath: ['pan']
});
sf.keyboard.press({
keys: "return",
});There's probably a better way to do it but it works for me.
Christian Scheuer @chrscheuer2019-09-10 21:39:41.373Z
That works - you could also do this for 5.1 tracks:
sf.ui.proTools.selectedTrack.trackDisplaySelect({ displayPath: ['pan', 'front pos'] });
- MMartin Pavey @Martin_Pavey
Oh wow, its that easy to get to sub menus!
Love it.
M - In reply tochrscheuer⬆:GGray Aletter @Gray_Aletter
Hey @chrscheuer . This is great! Wondering if it's possible to script it so it does the same but with whatever tracks you have selected (like how "-" will cycle between volume automation and waveform for ALL selected tracks. Thx!
Christian Scheuer @chrscheuer2022-11-19 11:20:39.598Z
Yes :)
sf.ui.proTools.selectedTrack.trackDisplaySelect({ displayPath: ['pan', 'front pos'], selectForAllSelectedTracks: true, });
I'd highly recommend checking out how to build this via macros first, then it's easy to click "Convert to Script". You can also click "Suggest" while between the
{
and}
of an action to see the parameters available.This has more details:
https://soundflow.org/docs/how-to/custom-commands/using-code-completion
- GGray Aletter @Gray_Aletter
Incredible. I was able to create a macro by understanding your code!
I know the attachment below is incorrect but I'm trying to figure out how to create an "if" statement within the macro.
Basically want to press "CMD -" to open pan and then IF pan view is open, if you press again it takes you back to waveform.
Is there a way to do this within macro view?
Christian Scheuer @chrscheuer2022-11-19 12:43:44.909Z
You can't do "if" logic yet in macros (but we'll add that in a future release)
- In reply toMartin_Pavey⬆:Mike Wax @mikewax
This is brilliant!!
Would there be a way to show plug-in automation?
Christian Scheuer @chrscheuer2022-02-09 17:32:22.258Z
Hey Mike,
The
displayPath
property just takes the menu "path" from the popup menu where you select what to show. So you can get it to show anything from that menu.