Open all plug in windows on selected track
Is there a way to open ALL plug-ins on the selected track? and then close all of them with the same macro
- Christian Scheuer @chrscheuer2020-10-23 10:44:47.624Z
Something like this should open all inserts on the selected track:
let track = sf.ui.proTools.selectedTrack; function getInsertWin(track, insertIndex) { const insertChars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']; const insertChar = insertChars[insertIndex]; const trackName = track.normalizedTrackName; return sf.ui.proTools.windows.whoseTitle.startsWith('Plug-in:').filter(w => { if (w.popupButtons.whoseTitle.is('Track Selector').first.value.value !== trackName) return false; if (w.popupButtons.whoseTitle.is('Insert Position selector').first.value.value !== insertChar) return false; return true; })[0]; } for (let i = 0; i < 10; i++) { if (!track.insertButtons[i].invalidate().exists) continue; if (track.insertButtons[i].value.value === "unassigned") continue; let pluginWin = getInsertWin(track, i); if (!pluginWin) { track.insertButtons[i].elementClick(); while (true) { pluginWin = getInsertWin(track, i); if (pluginWin) break; sf.wait({ intervalMs: 100 }); } //Disable target mode on newly opened window pluginWin.buttons.whoseTitle.is('Target button').first.elementClick(); } }
I'd then use one of our functions that deal with closing all floating windows to close them again.
- JJonathan Grossman @Jonathan_Grossman
This is a great start....thank you!
Can we adjust so the plug in windows array across the screen? Right now they all open on top of each other. Also, can this same button then close these window when done? Closing ALL currently open floating windows won't work bc I have several metering plug ins always floating.
Christian Scheuer @chrscheuer2020-10-23 18:57:05.577Z
Arranging plugin windows is a much larger task, not a simple one, unfortunately.
You're more than welcome to try out algorithms - using the windowMove action.- JJonathan Grossman @Jonathan_Grossman
ok - thanks.
sadly this script isn't working now tho. It worked fine, then I was working another script ( from the post titled "Select Track as trigger") and since then this script stopped working. I'm wondering if something about the "run forever" part of that other script is now interfering? I tried deleting the script. Stopping all macros. Restarting SF and PT. nothing will get the "Open All Plug-in Windows on Selected Track" to work tho.
Christian Scheuer @chrscheuer2020-10-24 12:03:08.698Z
Can you be more specific in describing what you mean by "not working"?
Please see this guide for how to best get help with a script:
- JJonathan Grossman @Jonathan_Grossman
When I run the command, absolutely nothing happens, as though the code isn’t complete.
Christian Scheuer @chrscheuer2020-10-24 14:53:50.384Z
Thanks, Jonathan. Can I get you to follow the "1st priority: Get help on a specific script or macro" guidelines as mentioned in the link above (How to get help with SoundFlow)? That will give us a complete copy of your script & log files, which will help us understand what's going on.
The best way to do this, is to run the script and then immediately after seeing the error (which in this case is that nothing happens), then use the Help workflow outlined. That way the interesting part of the log file will be at the end, and so will be easier for us to locate.