Toggle Bypass script
Title
Toggle Bypass script
What do you expect to happen when you run the script/macro?
The script is supposed to toggle Bypass on a particular insert on "Master 1" track.
Are you seeing an error?
What happens when you run this script?
The scipt selects the Master 1 track, but it will not toggle the bypass on any insert.
How were you running this script?
I clicked the "Run Script" or "Run Macro" button in SoundFlow
How important is this issue to you?
2
Details
{ "inputExpected": "The script is supposed to toggle Bypass on a particular insert on \"Master 1\" track.", "inputIsError": false, "inputWhatHappens": "The scipt selects the Master 1 track, but it will not toggle the bypass on any insert.", "inputHowRun": { "key": "-MpfwYA4I6GGlXgvp5j1", "title": "I clicked the \"Run Script\" or \"Run Macro\" button in SoundFlow" }, "inputImportance": 2, "inputTitle": "Toggle Bypass script" }
Source
sf.ui.proTools.trackSelectByName({
names: ["Master 1"],
});
sf.ui.proTools.selectedTrack.trackInsertToggleBypass({
insertNumber: 1
});
Links
User UID: ouVomiblTcg16kRSE2X1eH7HEGj1
Feedback Key: sffeedback:ouVomiblTcg16kRSE2X1eH7HEGj1:-Mxsj4_swRlbZKYH4oX3
- Christian Scheuer @chrscheuer2022-03-11 14:51:00.043Z
Hi Timo,
Do you have Linked Edit and Track Selection turned on?
- TIn reply toTimo_Pulkkinen⬆:Timo Pulkkinen @Timo_Pulkkinen
How do one turn them on?
Chris Shaw @Chris_Shaw2022-03-15 17:52:22.398Z
Hey Timo,
"Link Track and Edit Selection" can be found under "Options" in the main Pro Tools menu.Generally speaking, the two settings that need to be on for SF to operate smoothly is "Link Track and Edit Selection" as described above and both "Tooltips" options in the PT preferences:
Chris Shaw @Chris_Shaw2022-03-15 18:06:13.377Z
As for the problem you're having with the script above, it's best to run SF script while Pro Tools is the frontmost / focused application. You should assign a trigger to the script and trigger it while PT is the active application.
If you need to run a script from the SF editor then the first line of your script should be
sf.ui.proTools.appActivate();
which will focus Pro Tools before continuing on with the rest of your script.Similarly, if you need to run a macro from the SF editor then the first action in your macro should activate Pro Tools: