Toggle Disable on Multiple Commands
It was be really great to be able to disable a group of commands without having to go through one by one. For instance, I have two different sets of Open Send commands. One set opens the send. The other set opens the send and un-bypasses it. Depending on the workflow of a particular show I might want to quickly disable/enable all ten commands at once to use the alternate set.
- Christian Scheuer @chrscheuer2019-03-02 04:31:18.323Z
Hi @sbiss.
This is a good idea in general.
For your specific use case though, have you considered having 2 different profiles for this (note, not accounts but profiles, selectable inside the Profile menu in SF)? - SIn reply tosbiss⬆:Steve Bissinger @sbiss2019-03-05 00:46:10.584Z
It's true that 2 profiles would work. I only have a few commands I would change, so it's simpler not to have to update 2 profiles when I add to or refine my existing commands. And sometimes when you're working out a workflow it's nice to be able to toggle a set of commands on/off within a single profile.
- In reply tosbiss⬆:Christian Scheuer @chrscheuer2019-03-12 12:31:34.401Z
Another way to do this is using
globalState
in the script.One script could toggle the state between Setting 1 and Setting 2:
globalState.unbypassWhenOpenSend = !globalState.unbypassWhenOpenSend;
Then, in your Open Send commands you check if the globalState property is set or not:
sf.ui.proTools.selectedTrack.trackSendToggleShow({ sendNumber: 1, }); if (globalState.unbypassWhenOpenSend) { sf.ui.proTools.selectedTrack.trackSendToggleActive({ sendNumber: 1, }); }
This way you only have 1 command per send, and then you use the Toggle command (1st script here) to switch between the 2 modes.
Note you can use much more advanced functionality like this.