No internet connection
  1. Home
  2. How to

Can I only select tracks that belong to a specific group? in Pro tools

By Yujiro Yonetsu @Yujiro_Yonetsu
    2020-10-23 15:41:30.829Z

    I want to do an action that only selects the drum track or only selects multiple tracks of bass, what is the best way to do that?

    Solved in post #5, click to view
    • 6 replies
    1. Do you want this to happen based on the track's name or based on the track belonging to a group?

      1. In reply toYujiro_Yonetsu:
        Yujiro Yonetsu @Yujiro_Yonetsu
          2020-10-23 16:12:14.401Z

          I want to select based on the track belonging to a group.

          1. In reply toYujiro_Yonetsu:
            Yujiro Yonetsu @Yujiro_Yonetsu
              2020-10-23 16:13:21.726Z

              In other words, I want it to behave like when I click on the leftmost column of the group window.

              1. You should be able to use something like this:

                function getGroup(name) {
                    var groupList = sf.ui.proTools.mainWindow.tables.whoseTitle.contains('Group').first;
                    return groupList.childrenByRole("AXRow").allItems.map(function (r) {
                        return {
                            row: r,
                            selectBtn: r.childrenByRole("AXCell").first.children.first,
                            name: r.childrenByRole("AXCell").allItems[1].children.first.title.value.match(/^.+ - ([^(]+)/)[1].replace(/ $/, ''),
                        };
                    }).filter(function (r) { return r.name == name })[0];
                }
                
                function selectGroup(name) {
                    var grp = getGroup(name);
                    if (!grp) { log('Error', 'Group "' + name + '" not found'); throw 0; }
                    grp.selectBtn.mouseClickElement({});
                }
                
                selectGroup("Group 1");
                
                ReplySolution
                1. See here for more context:

              2. In reply toYujiro_Yonetsu:
                Yujiro Yonetsu @Yujiro_Yonetsu
                  2020-10-23 17:11:13.256Z

                  Awesome!

                  Thank you so much!