Open all pan automation lanes on selected track
I hope everyone is well in Soundflow world.
I've tried to write a script to get the above to work:
sf.ui.proTools.selectedTrack.children.whoseTitle.is('Show/hide automation lanes').first.elementClick();
sf.ui.proTools.mainWindow.groups.allItems[157].popupButtons.first.elementClick();
sf.keyboard.press({
keys: "down, down, down, down, right, return",
});
Admittedly no very elegant, but it gets the show hide automation lanes open and the menu selector clicked.
I tried to get to the pan/all pan types pop up menu with keystrokes but they fail even with a wait command.
I can't see why they fail, because if I do the final keystrokes manually it works?
Anyhow any help gratefully received, it would be really great if it was a toggle that reverted back to the default- 'volume' state with the show hide automation lanes closed, but I'm afraid that is beyond my paltry skills.
- Chris Shaw @Chris_Shaw2022-05-21 18:12:27.462Z
This should do it:
This will only work on the first selected track.
If there are less than two pans or no pans the script will throw an error.sf.ui.proTools.mainWindow.invalidate(); const trackName = sf.ui.proTools.selectedTrackHeaders[0].title.value; //If any automation lane for selected tracks are hidden, show them. const showautomationLanesBtn = sf.ui.proTools.selectedTrack.children.whoseTitle.is('Show/hide automation lanes').first; if (showautomationLanesBtn.value.invalidate().value !== "Selected") { showautomationLanesBtn.mouseClickElement({ }); } else { showautomationLanesBtn.mouseClickElement(); showautomationLanesBtn.mouseClickElement({ }); } let automationLanes = sf.ui.proTools.mainWindow.invalidate().children.whoseTitle.endsWith("Automation Lane").filter(f => f.title.invalidate().value.indexOf(trackName) === 0); try { automationLanes[0].popupButtons.whoseTitle.is("Lane view selector").first.popupMenuSelect({ menuPath: ["pan", "all pan types"], }); } catch (err) { log("There was a problem:","There is only one or no pan lanes on this track") }
- GGray Aletter @Gray_Aletter
Is there a way to open all of the tracks you've got selected with cursor?
Also yes having it close with the same key stroke would be amazing!
Thanks for the help - In reply toChris_Shaw⬆:PPatch Morrison @Patch_Morrison
Hi,
I've been using this command alot of the last couple of years and it's been working great, but all of a sudden I'm now getting the "There is only one or no pan lanes on this track" error. It seems to not be able to get beyond the first "pan" submenu to then target the "all pan lanes" option.I'm on PT 24.10.2 on an Intel mac (Monterey).
Any thoughts much appreciated!
Cheers
- MIn reply toMartin_Pavey⬆:Martin Pavey @Martin_Pavey
Hi Chris,
This works great, thanks so much!
The icing on the cake for me would be if a second press toggled it back the way it was and closed the automation lanes dropdown.
Is that possible?