Make Inactive And Hide Script?
Hi guys...does anybody have a script for these two commands combined?
I'm a total Soundflow novice! - I tried these macros....first one works but the 2nd half fails :-/ I'm sure there must be an easier way?
Thanks :)
Mike

- Raphael Sepulveda @raphaelsepulveda2021-03-12 18:35:51.859Z
Hey Mike!
Give this a shot!
sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.mainWindow.invalidate(); sf.ui.proTools.selectedTrack.popupButtons.first.popupMenuSelect({ isRightClick: true, menuPath: ['Hide and Make Inactive'], });
Mike Cave @Mike_Cave
Thanks Raphael...this works perfectly from the edit window :)
Is there any way to make it work from the mix window? This is usually where i'm working when i need this command so would be amazing if it's possible? Fingers crossed!
Best wishes
MikeChris Shaw @Chris_Shaw2021-03-12 19:32:57.259Z
Hey Mike,
I wouldn't be surprised if Raphael figures a way to make this work in the Edit window. In the meantime I have a package in the store called Mix Window Compatibility Helper Scripts which you ca easily add to any existing scripts to make them work from the Mix window. What they do is detect if the Mix window is open, briefly switches to the Edit window, runs your script and then switches back.
- In reply toMike_Cave⬆:
Raphael Sepulveda @raphaelsepulveda2021-03-12 19:43:08.425Z
This is doable! I'm about to head into a session now but I can get this together for you over the weekend. In the meantime, @Chris_Shaw 's suggestion is definitely the way to go!
Raphael Sepulveda @raphaelsepulveda2021-03-12 20:01:09.976Z
@Mike_Cave Managed to sneak this in before heading out!
// Hide and Make Inactive (Works on both Edit and Mix windows) function hideAndMakeInactive() { // Make sure Pro Tools main window is active sf.ui.proTools.appActivateMainWindow(); // Refresh window sf.ui.proTools.mainWindow.invalidate(); // Identify the Track List popup button on whichever window is currently focused const trackListPopUpBtn = sf.ui.proTools.focusedWindow.buttons.whoseTitle.is("Track List pop-up").first; // Make selected tracks inactive sf.ui.proTools.menuClick({ menuPath: ['Track', 'Make Inactive'] }); // Hide selected tracks trackListPopUpBtn.popupMenuSelect({ menuPath: ['Hide Selected Tracks'] }); }; hideAndMakeInactive();
This is basically the way you were trying to do it in your macro, I just made sure it works on whichever window is open. Didn't have time to test it too much but it should be solid. Let me know how it works out for ya!
Mike Cave @Mike_Cave
Thank you so much!! @raphaelsepulveda @Chris_Shaw ...you guys are amazing!! :)
- MIn reply toMike_Cave⬆:Matt Neveu @Matt_Neveu
How would I modify this script to have show and make active instead? SInce its a different pro tools window your showing selecting?
Raphael Sepulveda @raphaelsepulveda2024-05-03 03:27:44.501Z
@Matt_Neveu, give this a try:
function showAndActivateInactiveTracks() { const inactiveTrackNames = sf.app.proTools.tracks.invalidate().allItems .reduce((inactiveTrackNames, track) => { if (track.isInactive) inactiveTrackNames.push(track.name); return inactiveTrackNames; }, []); sf.app.proTools.setTrackHiddenState({ enabled: false, trackNames: inactiveTrackNames }); sf.app.proTools.setTrackInactiveState({ enabled: false, trackNames: inactiveTrackNames }); } showAndActivateInactiveTracks();