No internet connection
  1. Home
  2. How to

Pro Tools - Select all tracks

By Steve Dawson @Steve_Dawson
    2022-03-06 00:36:10.364Z

    Is there a macro to select all tracks in PT? I found one to deselect all, but not to select all.

    • 3 replies
    1. Kitch Membery @Kitch2022-03-06 03:43:00.766Z

      Hi @Steve_Dawson,

      There are a few ways to achieve this... This way will select all tracks that are currently visible in the Edit window.

      function selectAllVisibleTracks() {
          sf.ui.proTools.trackDeselectAll();
      
          const topOfEditWindow = sf.ui.proTools.mainWindow.timelineFocusButton.frame.y;
      
          const topTrack = sf.ui.proTools.visibleTrackHeaders.filter(h => h.frame.y >= topOfEditWindow)[0];
      
          topTrack.titleButton.mouseClickElement({ isOption: true });
      }
      
      selectAllVisibleTracks();
      

      Note: because this uses a mouse click be sure to not have anything covering the first visible track in Edit window.

      Hope that helps :-)
      Rock on!

      1. Noah Woodburn @Noah_Woodburn
          2022-08-07 22:44:40.525Z

          Hi there!

          Is there a way to modify this so it selects hidden tracks as well?

          Thanks in advance!

          1. Ryan DeRemer @Ryan_DeRemer
              2022-08-17 03:32:28.878Z

              Hey Noah.

              This should do it. I haven't tested it with closed folders (those report their contained tracks a bit differently), but it'll select all tracks in the session.

              sf.ui.proTools.appActivateMainWindow();
              sf.ui.proTools.mainWindow.invalidate();
              sf.ui.proTools.mainWindow.tables.whoseTitle.is("Group List").first.childrenByRole("AXRow").first.childrenByRole('AXCell').first.buttons.first.elementClick();