No internet connection
  1. Home
  2. How to

Pro Tools - <ALL> group macro and 'select all following' macro

By Julian Corrie @Julian_Corrie
    2023-08-09 19:46:41.815Z

    Hi there,

    I am a new user of SoundFlow. I would like to create a single macro that turns on the ALL group in Pro Tools, and simultaneously makes a cut and activates 'select all following' - selecting all regions to the right of the playhead. I've been editing a podcast and this is the operation I have performed most frequently - it's possible with multiple keyboard shortcuts but a bit of a faff.

    I discovered a script for toggling the ALL group here: Toggle the ALL Group? but I can't get it to work. I managed to create a new script (despite being very confused by "Please select a custom command package that you want to create your command in."), copied the above linked script into it and saved it, but received no response from Pro Tools. Note that my copy of Pro Tools is responding to other commands, so SoundFlow is successfully talking to it. Can anyone help with this?

    Secondly, 'select all following' is a keyboard shortcut only - Cmd Shift Enter - it doesn't exist in the Pro Tools menus. How do I map a macro to a command that doesn't exist in the menus?

    Thanks,

    Julian

    Solved in post #5, click to view
    • 5 replies
    1. Nathan Salefski @nathansalefski
        2023-08-09 22:18:43.434Z2023-08-09 23:21:39.316Z

        This should work for you. Packages are essentially containers for macros and scripts. I suggest making one, and naming it your initials plus DAWs name. That is where you can store all your macros and scripts -- both made by you and others. This should solve your issue though.

        sf.ui.proTools.appActivate();
        sf.ui.proTools.mainWindow.invalidate();
        
        //Define All Group
        const groupsView = sf.ui.proTools.mainWindow.groupListView
        const groupNames = groupsView.children.whoseRole.is("AXColumn").whoseTitle.is("Name ").first
        const allGroup = groupNames.children.whoseRole.is("AXRow").first.children.whoseRole.is("AXCell").allItems[1]
        
        function selectAllFollowing() {
        
            //Extend Edit to All Tracks
            sf.ui.proTools.menuClick({ menuPath: ["Edit", "Selection", "Extend Edit Down"], });
        
            //Cut
            sf.ui.proTools.menuClick({ menuPath: ["Edit", "Cut"], });
            
            //Select All Following
            sf.keyboard.press({ keys: "cmd+shift+enter",}); 
            //sf.keyboard.press({ keys: "alt+shift+return",}); //FOR MAC
        }
        
        function main() {
        
            //Toggle All Group
            allGroup.elementClick();
        
            //
            selectAllFollowing();
        
            //Toggle All Group
            allGroup.elementClick();
        
        }
        
        main();
        
        1. JJulian Corrie @Julian_Corrie
            2023-08-11 11:02:10.242Z

            Thanks so much! Pro Tools is responding to this but it's not quite working how I want - however the syntax looks easy enough to parse so I'll have a play around with it and if I get it how I want it I'll post it back here

            1. Nathan Salefski @nathansalefski
                2023-08-11 12:58:56.566Z

                For sure. What exactly isn't working how you'd like? I can adjust it for you

                1. JJulian Corrie @Julian_Corrie
                    2023-08-11 16:38:59.761Z2023-08-11 16:57:00.875Z

                    Thanks Nathan. Firstly I'd told you the wrong keyboard shortcut for 'select all following', it's actually alt shift enter as mentioned in the comment, sorry about that!

                    Then 'extend edit down' scrolls Pro Tools to the bottom track, which is unhelpful as I'm often editing w.r.t a dialogue track at the top of the edit.

                    Finally I realised I needed to force a mouse click at current position to get it to work. Here is my solution:

                    sf.ui.proTools.appActivate();
                    sf.ui.proTools.mainWindow.invalidate();
                    
                    //Define All Group
                    const groupsView = sf.ui.proTools.mainWindow.groupListView
                    const groupNames = groupsView.children.whoseRole.is("AXColumn").whoseTitle.is("Name ").first
                    const allGroup = groupNames.children.whoseRole.is("AXRow").first.children.whoseRole.is("AXCell").allItems[1]
                    
                    //Define mouse click position
                    const mousePos = sf.mouse.getPosition().position;
                    
                    function main() {
                        
                        //Toggle All Group
                        allGroup.elementClick();
                    
                        //Click The Mouse
                        sf.mouse.click({ position: mousePos,});
                    
                         //Cut
                        sf.keyboard.press({keys: "cmd+e",});
                    
                        //Select All Following
                        sf.keyboard.press({ keys: "alt+shift+enter",}); 
                        //sf.keyboard.press({ keys: "alt+shift+return",}); //FOR MAC
                    
                        //Toggle All Group
                        allGroup.elementClick();
                    
                    
                    }
                    
                    main();
                    
                    
                    
                    ReplySolution
                    1. Nathan Salefski @nathansalefski
                        2023-08-11 19:18:28.155Z

                        Oh I see, you said perform a cut which I interpreted differently than separating the clips. Just curious, why not group the podcast tracks into an Edit Group rather than toggling on an off the all group? It wouldn't rely on mouse that way and would be much simpler.

                        //Separate Clip at Selection
                        sf.ui.proTools.menuClick({ menuPath: ["Edit", "Separate Clip", "At Selection"], });
                        
                        //Select All Following
                        sf.keyboard.press({ keys: "alt+shift+return",});