No internet connection
  1. Home
  2. How to

Select ALL clips in a SELECTED TRACK

By Dav3 @D_av_3
    2021-05-12 02:29:29.154Z

    Hi Guys I was looking in the forum if someone had already done something like this but I was not lucky ... but maybe I just searched badly .. I need a script to select all the clips of a selected track ... you have in mind anything to do this?

    • 6 replies
    1. Kitch Membery @Kitch2021-05-12 08:33:54.517Z

      Hi @Davide_Docente

      If a track is selected, you can use the "Click Menu Item" Macro action to select all which should select all the clips in the track;

      Or use the following script;

      sf.ui.proTools.menuClick({
          menuPath: ["Edit","Select All"],
      });
      

      Hope that helps.

      Rock on!

      1. Dav3 @D_av_3
          2021-05-12 08:52:28.063Z

          Hi Kitch
          What I need to do is make fades and crossfades on all the clips contained in selected (two or three) tracks ... to do this I need to select all the clips in these tracks ... the command you suggested seems to do nothing ... if I had to do it manually I would select a point in the timeline..I would select the tracks and then I would do cmd + A. .. how can I make the script do all this?

          1. Kitch Membery @Kitch2021-05-12 09:03:17.729Z

            Ahh I see, Thats possible for sure @Davide_Docente.

            Quick question though. Do you have the "Link Track and Edit Selection" button selected in the Pro Tools header?

            This will allow your cursor to be focused on the tracks that are selected.

            1. Dav3 @D_av_3
                2021-05-12 09:05:34.498Z

                Ouchhh...you're totally right ...man

                1. Kitch Membery @Kitch2021-05-12 09:08:26.259Z

                  Yeah... I can only think of a few scenarios where you'd want it off.

                  It caught me out when I first started writing scripts. :-)

                  Rock on!

              • In reply toD_av_3:
                Kitch Membery @Kitch2021-05-12 09:15:45.026Z

                This should do the trick mate! :-)

                function addFadesToAllClipsOnSelectedTracks() {
                    sf.ui.proTools.menuClick({
                        menuPath: ["Options", "Link Track and Edit Selection"],
                        targetValue: 'Enable'
                    });
                
                    sf.ui.proTools.menuClick({
                        menuPath: ["Edit", "Select All"],
                    });
                
                    sf.ui.proTools.menuClick({
                        menuPath: ["Edit", "Fades", 'Create...'],
                    });
                
                    const win = sf.ui.proTools.windows.whoseTitle.is("Batch Fades").first;
                
                    win.elementWaitFor();
                
                    win.buttons.whoseTitle.is("OK").first.elementClick();
                
                    win.elementWaitFor({
                        waitType: "Disappear",
                    });
                }
                
                addFadesToAllClipsOnSelectedTracks();