How to render the frontmost AudioSuite plug-in
By @anon6770933309
This is a reply to a request by Lars Rasmussen on Facebook:
// This command renders audio in the frontmost AudioSuite plug-in
/* Script includes code from Oliver Momm */
// Function to set Pro Tools frontmost via AppleScript
function setPTfrontmost() {
sf.system.execAppleScript({
script: 'tell application "System Events" to tell process "Pro Tools" to set frontmost to true'
});
}
// Set Pro Tools frontmost
setPTfrontmost();
sf.wait({ intervalMs: 50 });
// Render frontmost AudioSuite plug-in
var asWin = sf.ui.proTools.getFloatingWindowWithTitleStartingWith('Audio Suite:');
asWin.getFirstWithTitle('Render').elementClick();