Hey all,
Is there a better way to set multiple sends to Pre-Fader than shift+option+click on the relative position of the Output Fader? I've tried to call the right click menu on the Send Insert, but can't seem to right click it. Currently if the send is already present, and Pre-Fade is turned on, it will be toggled off. The idea functionality is that it would check, and ensure it was pre-fade.
The script is designed to add a send to my headphone system, set them to Pre-Fader, then copy the main mix settings to them.
sf.ui.proTools.appActivateMainWindow();
var startingWindow= mainWindowStatus();
function mainWindowStatus() {
if (sf.ui.proTools.getMenuItem('Window', 'Mix').isMenuChecked) {
sf.ui.proTools.menuClick({
menuPath: ["Window", "Edit"],
});
return "Mix";
} else {
return "Edit";
}
}
function returnToStartingMainWIndow(mainWindow) {
switch (mainWindow) {
case "Mix":
sf.ui.proTools.menuClick({
menuPath: ["Window", "Mix"],
});
break;
case "Edit":
break;
}
}
sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({
insertOrSend: "Send",
pluginNumber: 10,
pluginSelector: items => items.filter(item => item.path[0] === "bus" && item.path.slice(-1)[0] === "Click CUE1 (Stereo)")[0],
skipWhenValueIs: "Click CUE1 (Stereo)",
selectForAllSelectedTracks: true,
});
sf.ui.proTools.mainTrackOutputWindow.elementWaitFor();
sf.ui.proTools.mainTrackOutputWindow.mouseClickElement({
relativePosition: {"x":50,"y":84},
isShift: true,
isOption: true,
});
sf.ui.proTools.menuClick({
menuPath: ["Edit","Automation","Copy to Send..."],
});
sf.ui.proTools.selectedTrack.trackSendToggleShow({
sendNumber: 10,
});
sf.ui.proTools.menuClick({
menuPath: ["Edit","Automation","Copy to Send..."],
});
sf.ui.proTools.windows.whoseTitle.is('Copy To Send').first.elementWaitFor();
sf.ui.proTools.windows.whoseTitle.is('Copy To Send').first.checkBoxes.whoseTitle.is('Current Value').first.checkboxSet({
targetValue: "Enable",
});
sf.ui.proTools.windows.whoseTitle.is('Copy To Send').first.checkBoxes.whoseTitle.is('Automation').first.checkboxSet({
targetValue: "Disable",
});
sf.ui.proTools.windows.whoseTitle.is('Copy To Send').first.checkBoxes.whoseTitle.is('Volume').first.checkboxSet({
targetValue: "Enable",
});
sf.ui.proTools.windows.whoseTitle.is('Copy To Send').first.checkBoxes.whoseTitle.is('Pan').first.checkboxSet({
targetValue: "Enable",
});
sf.ui.proTools.windows.whoseTitle.is('Copy To Send').first.checkBoxes.whoseTitle.is('Mute').first.checkboxSet({
targetValue: "Enable",
});
sf.ui.proTools.windows.whoseTitle.is('Copy To Send').first.checkBoxes.whoseTitle.is('LFE').first.checkboxSet({
targetValue: "Disable",
});
sf.ui.proTools.windows.whoseTitle.is('Copy To Send').first.popupButtons.whoseDescription.is('').first.popupMenuSelect({
menuPath: ["Send J"],
});
sf.ui.proTools.windows.whoseTitle.is('Copy To Send').first.buttons.whoseTitle.is('OK').first.elementClick();
sf.ui.proTools.windows.whoseTitle.is('Copy To Send').first.elementWaitFor({
waitType: "Disappear",
});
// end with this
returnToStartingMainWIndow(startingWindow);
- Christian Scheuer @chrscheuer2020-10-21 12:08:17.088Z
I think it should be possible to Option+Shift click (still with mouseClickElement though) directly on the desired button instead of relative to the window.
- TTJ Allen @TJ_Allen
Ahh yes, thanks, Christian, that makes sense and is working fine. I should have tried that.
sf.ui.proTools.mainTrackOutputWindow.buttons.whoseTitle.is('Pre/Post fader').first.mouseClickElement({ isShift: true, isOption: true, });
Is it possible to get Soundflow to report back on the state of the Pre-Fader buttons and only click them if they aren't already? In other words, not toggle their state, only enable them?
Christian Scheuer @chrscheuer2020-10-21 13:38:04.706Z
Yes, you should be able to read the value of that specific button by following this tutorial:
And then use this method to do an if/else:
- TTJ Allen @TJ_Allen
This is brilliant - thanks Christian and Kitch for the really clear video's. I've gone through most of them now, and have a head full of ideas.
Christian Scheuer @chrscheuer2020-10-22 13:10:56.252Z
Yay - @Kitch will be happy to hear this :)