If a certain action is aborted, how to skip to next actions until a certain action.
By Mitch Willard @Mitch_Willard
I'm writing a script for bouncing a series of mixes that are in a timeline that I have marked with memory locations. I want the script to skip certain actions if a memory location doesn't exist. I've tried the Try/Catch/Finally but to no success, can anyone give any suggestions on how to achieve this?
here is an exple of the code I'm trying to achieve. If memroy location "101" doesn't exist, I want it to skip the next action of go to memory location "102", if it does exist, I want it to run the action.
sf.ui.proTools.memoryLocationsGoto({
memoryLocationNumber: 101,
onCancel: "Abort",
});
//Calling command "5 - BOUNCE DIALOG - ID" from package "TAG BOUNCING"
sf.soundflow.runCommand({
commandId: 'user:ckugewuha00026v10aurd13dc:cl0ovote0000d281002rv0xxc',
props: {}
});
sf.ui.proTools.memoryLocationsGoto({
memoryLocationNumber: 102,
onCancel: "Abort",
});
//Calling command "5 - BOUNCE DIALOG - ID" from package "TAG BOUNCING"
sf.soundflow.runCommand({
commandId: 'user:ckugewuha00026v10aurd13dc:cl0ovote0000d281002rv0xxc',
props: {}
});
Thanks
Mitch
- Christian Scheuer @chrscheuer2022-03-20 17:57:56.071Z
Hi Mitch,
You could do something like this:
let memLocSuccess = sf.ui.proTools.memoryLocationsGoto({ memoryLocationNumber: 101, onError: 'Continue', }).success; //Calling command "5 - BOUNCE DIALOG - ID" from package "TAG BOUNCING" if (memLocSuccess) { sf.soundflow.runCommand({ commandId: 'user:ckugewuha00026v10aurd13dc:cl0ovote0000d281002rv0xxc', props: {} }); }