I'm trying to come up with a script that lets me toggle between two different sets of AudioSuite processing options (create individual files/clip by clip and create continuous file/entire selection). I know already how to change the options:
asWin.audioSuiteSetOptions({
processingInputMode: "ClipByClip",
processingOutputMode: "CreateIndividualFiles",
});
What I can't figure out is how to read the current settings in order to toggle them. There doesn't seem to be audioSuiteGetOptions or similar. Is there another way of achieving what I want?
- Christian Scheuer @chrscheuer2020-03-06 21:19:33.212Z
Hi @alex
Do you want to read them so that you have one command that just toggles between the two states?
Christian Scheuer @chrscheuer2020-03-06 21:24:46.348Z
Great - you should be able to do it like this (this works on a named AudioSuite plugin, there's also an option to work on the top-most plugin if you prefer):
var pluginName = 'AudioTrack Stereo'; if (sf.ui.proTools.getAudioSuiteWindow(pluginName).popupButtons.whoseTitle.is('Processing Output Mode').first.value.invalidate().value === "create individual files") { } else { }
Thanks, this worked perfectly. Here's the complete script in case anybody's interested:
var win = sf.ui.proTools.firstAudioSuiteWindow; if (win.popupButtons.whoseTitle.is('Processing Output Mode').first.value.invalidate().value === "create individual files") { win.audioSuiteSetOptions({ processingInputMode: "EntireSelection", processingOutputMode: "CreateContinuousFile" }); } else { win.audioSuiteSetOptions({ processingInputMode: "ClipByClip", processingOutputMode: "CreateIndividualFiles" }); }