No internet connection
  1. Home
  2. How to

change all track heights pt 2024.3

By @briannaas
    2024-04-04 17:35:33.994Z

    There have been several solutions and packages posted here to create a macro which changes all track heights to the same size, but all are failing with the current version of Pro Tools. I'm wondering if someone can create a new script that works?

    Thanks!

    Solved in post #2, click to view
    • 7 replies
    1. Chris Shaw @Chris_Shaw2024-04-04 18:49:00.736Z2024-04-04 19:18:31.244Z

      There were some changes in SF and PT 2024.3 that requires a slight change to clicking the track height menu. Older scripts by default use the "TopLeft" anchor point to calculate the click point for the track height menu. The newest version of SF now defaults to "MidCenter". To fix this you just have to set the anchor point property to "TopLeft" as seen in line 11 in the code below.


      You can just add the anchor: "TopLeft" property to the popupMenuOpenFromElement call in any older script that you've found that uses relativePosition:to make them work.

      This script will change the height of all visible tracks in a session. Just change the size variable to which ever height you need.

      var size = 'small';
      
      sf.ui.proTools.appActivate();
      var tracksToChangeHeight = sf.ui.proTools.visibleTrackNames
      
      sf.ui.proTools.trackGetByName({ name: tracksToChangeHeight[0], makeVisible: true }).track.trackScrollToView();
      
      var f = sf.ui.proTools.selectedTrack.frame;
      
      var popupMenu = sf.ui.proTools.selectedTrack.popupMenuOpenFromElement({
          anchor:"TopLeft",
          relativePosition: { x: f.w - 10, y: 5 },    
          isOption: true,
         // isShift: true,
      }).popupMenu;
      popupMenu.menuClickPopupMenu({
          menuPath: [size]
      });
      
      Reply2 LikesSolution
      1. KKei Shiraishi @Kei_Shiraishi
          2025-04-11 16:03:18.601Z

          This is so great! Is there a way to toggle all track size?

          1. I'm not sure exactly what you want.
            Could you give me a step by step example of what you want to do?

        • B
          In reply tobriannaas:
          @briannaas
            2024-04-04 18:54:44.518Z

            Perfect, thanks Chris!

            1. B
              In reply tobriannaas:
              @briannaas
                2024-07-03 22:41:09.410Z

                With another Pro Tools update, I am once again asking for your support in making this macro functional again.

                1. Let me know if tis works:

                  var size = 'medium';
                  
                  sf.ui.proTools.appActivate();
                  var tracksToChangeHeight = sf.ui.proTools.visibleTrackNames
                  
                  sf.ui.proTools.trackGetByName({ name: tracksToChangeHeight[0], makeVisible: true }).track.trackScrollToView();
                  
                  var f = sf.ui.proTools.selectedTrack.frame;
                  
                  sf.keyboard.press({keys:"left"})
                  
                  var popupMenu = sf.ui.proTools.selectedTrack.popupMenuOpenFromElement({
                      anchor:"TopLeft",
                      relativePosition: { x: f.w - 10, y: 5 },    
                      isOption: true,
                     // isShift: true,
                  }).popupMenu;
                  popupMenu.menuClickPopupMenu({
                      menuPath: [size]
                  });
                  
                  1. TTim Pennells @Tim_Pennells
                      2024-07-09 12:03:02.822Z

                      This one's not working sadly :/ it can't find the popup menu.

                      Very frustrating how Avid manages to break these codes every update