No internet connection
  1. Home
  2. How to

Fokke is compiling his first Action. Selecting tracks using Groups.

By Fokke van Saane @Fokke
    2019-07-20 09:58:04.371Z

    Ok. I made this for KM, now i want to bring this into SF. I want to use this project so i can learn java script. A lot i don't know, so this topic will be full of beginners questions, by me.

    A lil background.
    I want my edit window to quickly scroll to certain groups of tracks. Like, all sync tracks, or music tracks, FX tracks, etc. Some people use Memory Locations with Track Show Hide and size for this, but the reason i don't want to use this is that when you add a new track, you have to update the memorylocationmarker every time. That blocks workflow.

    So, i use another method. I make a group of the tracks i want to show/hide or "scroll into view" to. The group has no other functions assigned; it's an Edit group, but i disable it. When i enable it, i can use it as Edit group too.
    When i want to add a track, i don't do New Track... but i do Duplicate track to a member of the group. And i only tick "Group assignments". This way it adds all the properties; color, size, in/outs of the current track into a new empty track. Much Easier. And with the macro Christian made it even adds a number+1. wow.
    Now, to select tracks i click on the bullet left to the group, and all the tracks are selected. Now i can scroll to them, show or hide them, add or delete tracks to the group.

    I have made the following eight KM actions;
    1• Create Group. It creates group 4a, 4b, or 4c ~ 4h. I use the "4" to differentiate my Select Groups.
    2• Add track to group
    3• Scroll group into view
    4• Toggle Show/Hide Group (when shift is down, it adds to the currently selected tracks)

    I use my Xkeys stick-16 for these, as i use the command, shift and control modifiers to call the above actions.
    And i use the led to tell me the group is active.

    Now; How to set this up for SF.

    First action to compile is the Create Group of selected track(s).

    • 28 replies

    There are 28 replies. Estimated reading time: 58 minutes

    1. Yay!! Unfortunately I have just left my studio moments ago so am typing this from my phone. I'll write you something longer later but for now I think you should start discovering this via the macro editor. That let's you discover what the actions can do. Then you can click the little three dots to convert each action to Javascript. I think that will be a good startkng point.

      1. There s an action to create a group, but it doesn't support setting the group ID. So instead you'll need to use a menu click action, a wait for ui element (the window) and then maybe some keyboard actions. Sorry for not being more helpful, I hate my timing. But see if this helps a little and otherwise I'll be back to help more later today or tomorrow.

        1. Fokke van Saane @Fokke
            2019-07-20 10:10:52.180Z

            You hate your timing? You respond within a few minutes! :)

            1. @Fokke I LOVE this request. This is a PERFECT example of something we can test the macro system with, and find what is missing in order to do things like this.

              This is how far I got, then I stumbled onto a bug in the UI picker, where it thinks the Create Group window is the Main Window (I know why, so I'll fix it asap)

              1. Note the version of Pro Tools doesn't matter, since SoundFlow uses bundle IDs internally. It just displays the version you picked because it looks prettier than displaying the bundle IDs. So this will work on any Pro Tools that is open.

                1. The 1st "Click Menu Item" makes sure that the Track List (and hence Group List) is visible by using the Target Value: Enable setting on the click menu item. By setting to Enable instead of Toggle it will only click if it's not already selected.

                  1. Fokke van Saane @Fokke
                      2019-07-20 20:00:29.343Z

                      Thanks, will try to duplicate this.

                      How can i close the Track List if it was closed when launching the macro?

                      1. I'll take a look tomorrow. This is supported in SoundFlow internally but have to check if the macros support it yet.

                      2. In reply tochrscheuer:
                        Fokke van Saane @Fokke
                          2019-07-20 20:06:09.306Z

                          I think i have to make a special group ID because if i let ProTools just select to first empty one, i cannot recall it later when i want to click it to select the tracks.
                          So, i need some keyboard Presses. In KM i click on the ID; type 4 and then A en then Enter.
                          Then i let the user fill in a group name.

                          (later i will recall the group by clicking on the left of group "4a")

                          1. Ah gotcha. If you're just using the ids to be able to recall the groups try to look at our other group actions. You should be able to access groups by name with our group actions in general.

                            1. I've fixed some bugs now that means we can get further with this, fixes are in preview 104, I'll upload in a minute.

                              Here's a macro that goes a long way towards "Add to Group".

                              First we "Activate Only" the group "SelectGroup1", Open the Group List popup menu, and then click "Modify Groups". Note I've dragged the "popupMenu" output from the 2nd action to the UI Element input of the 3rd:

                              Now we 1) Wait for the window "Modify Groups" to appear, then we 2) click the Add button, then the OK button, and finally we wait for the window "Modify Groups" to disappear:


                              I've copied the whole macro here. You should be able to select the whole line here, copy it, and paste it into SoundFlow (select the command folder/package you want to paste in first)

                              {"command":{"data":{"root":{"_type":"BlockNode","body":[{"_key":"actionNode2","_type":"ActionNode","actionId":"proTools.groups.activateOnly","props":{"groupName":{"const":"SelectGroup1"}},"title":"Activate Only Group"},{"_key":"actionNode3","_type":"ActionNode","actionId":"proTools.groups.openListPopupMenu","title":"Open Group List Popup Menu"},{"_key":"actionNode4","_type":"ActionNode","actionId":"menu.clickPopupMenu","props":{"element":{"data":{"sourceNodeKey":"actionNode3","sourcePropertyName":"popupMenu"},"editor":"BindingEditor","eval":"actionNode3Result.popupMenu"},"menuPath":{"const":["Modify Groups"]}},"title":"Click Popup Menu"},{"_type":"ActionNode","actionId":"element.waitFor","title":"Wait for UI Element","_key":"actionNode5","props":{"element":{"eval":"sf.ui.proTools.windows.whoseTitle.is('Modify Groups').first","editor":"AxElementEditor","data":{"segmentGroups":[{"segments":[{"type":"AxCustomAppPathSegment","title":"Pro Tools","jsPropertyName":"proTools","eval":"sf.ui.proTools"},{"type":"AxAppBundleIdPathSegment","title":"Pro Tools","bundleId":"com.avid.ProTools","eval":"sf.ui.app('com.avid.ProTools')"}]},{"segments":[{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Modify Groups\"","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Modify Groups","index":null,"eval":"windows.whoseTitle.is('Modify Groups').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window of AXWindows","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"windows.first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Modify Groups\"","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Modify Groups","index":null,"eval":"children.whoseRole.is(\"AXWindow\").whoseTitle.is('Modify Groups').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"children.whoseRole.is(\"AXWindow\").first"},{"type":"AxCustomPropertyPathSegment","title":"Focused Window","jsPropertyName":"focusedWindow","eval":"focusedWindow"}]}]}}}},{"_type":"ActionNode","actionId":"element.click","title":"Click UI Element","_key":"actionNode6","props":{"element":{"eval":"sf.ui.proTools.windows.whoseTitle.is('Modify Groups').first.buttons.whoseTitle.is('Add').first","editor":"AxElementEditor","data":{"segmentGroups":[{"segments":[{"type":"AxCustomAppPathSegment","title":"Pro Tools","jsPropertyName":"proTools","eval":"sf.ui.proTools"},{"type":"AxAppBundleIdPathSegment","title":"Pro Tools","bundleId":"com.avid.ProTools","eval":"sf.ui.app('com.avid.ProTools')"}]},{"segments":[{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Modify Groups\"","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Modify Groups","index":null,"eval":"windows.whoseTitle.is('Modify Groups').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window of AXWindows","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"windows.first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Modify Groups\"","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Modify Groups","index":null,"eval":"children.whoseRole.is(\"AXWindow\").whoseTitle.is('Modify Groups').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"children.whoseRole.is(\"AXWindow\").first"},{"type":"AxCustomPropertyPathSegment","title":"Focused Window","jsPropertyName":"focusedWindow","eval":"focusedWindow"}]},{"segments":[{"type":"AxElementArrayIndexPathSegment","title":"First Button \"Add\"","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":"AXTitle","filterAttributeValue":"Add","index":null,"eval":"buttons.whoseTitle.is('Add').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Button \"\"","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":"AXDescription","filterAttributeValue":"","index":0,"eval":"buttons.whoseDescription.is('').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Button \"\"","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":"AXValue","filterAttributeValue":"","index":0,"eval":"buttons.whoseValue.is('').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Button","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"buttons.first"}]}]}}}},{"_type":"ActionNode","actionId":"element.click","title":"Click UI Element","_key":"actionNode7","props":{"element":{"eval":"sf.ui.proTools.windows.whoseTitle.is('Modify Groups').first.buttons.whoseTitle.is('OK').first","editor":"AxElementEditor","data":{"segmentGroups":[{"segments":[{"type":"AxCustomAppPathSegment","title":"Pro Tools","jsPropertyName":"proTools","eval":"sf.ui.proTools"},{"type":"AxAppBundleIdPathSegment","title":"Pro Tools","bundleId":"com.avid.ProTools","eval":"sf.ui.app('com.avid.ProTools')"}]},{"segments":[{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Modify Groups\"","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Modify Groups","index":null,"eval":"windows.whoseTitle.is('Modify Groups').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window of AXWindows","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"windows.first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Modify Groups\"","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Modify Groups","index":null,"eval":"children.whoseRole.is(\"AXWindow\").whoseTitle.is('Modify Groups').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"children.whoseRole.is(\"AXWindow\").first"},{"type":"AxCustomPropertyPathSegment","title":"Focused Window","jsPropertyName":"focusedWindow","eval":"focusedWindow"}]},{"segments":[{"type":"AxElementArrayIndexPathSegment","title":"First Button \"OK\"","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":"AXTitle","filterAttributeValue":"OK","index":null,"eval":"buttons.whoseTitle.is('OK').first"},{"type":"AxElementArrayIndexPathSegment","title":"6. Button \"\"","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":"AXDescription","filterAttributeValue":"","index":5,"eval":"buttons.whoseDescription.is('').allItems[5]"},{"type":"AxElementArrayIndexPathSegment","title":"6. Button \"\"","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":"AXValue","filterAttributeValue":"","index":5,"eval":"buttons.whoseValue.is('').allItems[5]"},{"type":"AxElementArrayIndexPathSegment","title":"6. Button","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":null,"filterAttributeValue":null,"index":5,"eval":"buttons.allItems[5]"}]}]}}}},{"_type":"ActionNode","actionId":"element.waitFor","title":"Wait for UI Element","_key":"actionNode8","props":{"element":{"eval":"sf.ui.proTools.windows.whoseTitle.is('Modify Groups').first","editor":"AxElementEditor","data":{"segmentGroups":[{"segments":[{"type":"AxCustomAppPathSegment","title":"Pro Tools","jsPropertyName":"proTools","eval":"sf.ui.proTools"},{"type":"AxAppBundleIdPathSegment","title":"Pro Tools","bundleId":"com.avid.ProTools","eval":"sf.ui.app('com.avid.ProTools')"}]},{"segments":[{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Modify Groups\"","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Modify Groups","index":null,"eval":"windows.whoseTitle.is('Modify Groups').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window of AXWindows","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"windows.first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Modify Groups\"","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Modify Groups","index":null,"eval":"children.whoseRole.is(\"AXWindow\").whoseTitle.is('Modify Groups').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"children.whoseRole.is(\"AXWindow\").first"},{"type":"AxCustomPropertyPathSegment","title":"Focused Window","jsPropertyName":"focusedWindow","eval":"focusedWindow"}]}]}},"waitType":{"const":"Disappear"}}}],"uid":"root","nodes":[]},"v":76},"id":"user:cjy7orsth0001km10gr3cte4g:cjyccrd4m00008v108znif801","name":"Test 1","type":"macro","bindings":{},"_packageKey":"cjy7orsth0001km10gr3cte4g","_packageName":"  Decks","_commandKey":"cjyccrd4m00008v108znif801","_isCustom":true,"_isInstalled":false,"bindingsText":""},"isCut":false}
                              
                              1. By searching for "group" in the "Add Action" popup you should be able to see all our existing actions that deal with groups:

                                1. Here's another macro that does the whole thing of creating a Group and setting both the Name and the Group ID:


                                  And here's the macro copy/pasted:

                                  {"command":{"name":"Create group with key test","type":"macro","id":"user:cjy7orsth0001km10gr3cte4g:cjycfeu2j0002fa10ffls4yfl","data":{"v":42,"root":{"_type":"BlockNode","uid":"root","body":[{"_type":"ActionNode","actionId":"app.activateMainWindow","title":"Activate App's Main Window","_key":"actionNode1","props":{"element":{"editor":"AppEditor","eval":"sf.ui.proTools","data":{"path":"/Applications/Pro Tools 2019.6.app","bundleId":"com.avid.ProTools","label":"Pro Tools 2019.6"}}}},{"_type":"ActionNode","actionId":"menu.click","title":"Click Menu Item","_key":"actionNode2","props":{"element":{"editor":"AppEditor","eval":"sf.ui.proTools","data":{"path":"/Applications/Pro Tools 2019.6.app","bundleId":"com.avid.ProTools","label":"Pro Tools 2019.6"}},"menuPath":{"const":["Track","Group..."]}}},{"_type":"ActionNode","actionId":"element.waitFor","title":"Wait for UI Element","_key":"actionNode3","props":{"element":{"eval":"sf.ui.proTools.createGroupDialog","editor":"AxElementEditor","data":{"segmentGroups":[{"segments":[{"type":"AxCustomAppPathSegment","title":"Pro Tools","jsPropertyName":"proTools","eval":"sf.ui.proTools"},{"type":"AxAppBundleIdPathSegment","title":"Pro Tools","bundleId":"com.avid.ProTools","eval":"sf.ui.app('com.avid.ProTools')"}]},{"segments":[{"type":"AxCustomPropertyPathSegment","title":"Create Group Dialog","jsPropertyName":"createGroupDialog","eval":"createGroupDialog"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Create Group\"","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Create Group","index":null,"eval":"windows.whoseTitle.is('Create Group').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window of AXWindows","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"windows.first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Create Group\"","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Create Group","index":null,"eval":"children.whoseRole.is(\"AXWindow\").whoseTitle.is('Create Group').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"children.whoseRole.is(\"AXWindow\").first"},{"type":"AxCustomPropertyPathSegment","title":"Focused Window","jsPropertyName":"focusedWindow","eval":"focusedWindow"}]}]}}}},{"_type":"ActionNode","actionId":"element.setTextFieldWithAreaValue","title":"Set Value of Text Field with Text Area","_key":"actionNode4","props":{"element":{"eval":"sf.ui.proTools.createGroupDialog.textFields.whoseTitle.is('').first","editor":"AxElementEditor","data":{"segmentGroups":[{"segments":[{"type":"AxCustomAppPathSegment","title":"Pro Tools","jsPropertyName":"proTools","eval":"sf.ui.proTools"},{"type":"AxAppBundleIdPathSegment","title":"Pro Tools","bundleId":"com.avid.ProTools","eval":"sf.ui.app('com.avid.ProTools')"}]},{"segments":[{"type":"AxCustomPropertyPathSegment","title":"Create Group Dialog","jsPropertyName":"createGroupDialog","eval":"createGroupDialog"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Create Group\"","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Create Group","index":null,"eval":"windows.whoseTitle.is('Create Group').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window of AXWindows","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"windows.first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Create Group\"","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Create Group","index":null,"eval":"children.whoseRole.is(\"AXWindow\").whoseTitle.is('Create Group').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"children.whoseRole.is(\"AXWindow\").first"},{"type":"AxCustomPropertyPathSegment","title":"Focused Window","jsPropertyName":"focusedWindow","eval":"focusedWindow"}]},{"segments":[{"type":"AxElementArrayIndexPathSegment","title":"First Text Field \"\"","arrayAttribute":"AXChildren","role":"AXTextField","filterAttribute":"AXTitle","filterAttributeValue":"","index":null,"eval":"textFields.whoseTitle.is('').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Text Field \"Group 3\"","arrayAttribute":"AXChildren","role":"AXTextField","filterAttribute":"AXValue","filterAttributeValue":"Group 3","index":null,"eval":"textFields.whoseValue.is('Group 3').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Text Field","arrayAttribute":"AXChildren","role":"AXTextField","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"textFields.first"}]}]}},"value":{"const":"My group"}}},{"_type":"ActionNode","actionId":"popupMenu.select","title":"Select Item in Popup Menu","_key":"actionNode5","props":{"element":{"eval":"sf.ui.proTools.createGroupDialog.popupButtons.whoseTitle.is('GroupIDView').first","editor":"AxElementEditor","data":{"segmentGroups":[{"segments":[{"type":"AxCustomAppPathSegment","title":"Pro Tools","jsPropertyName":"proTools","eval":"sf.ui.proTools"},{"type":"AxAppBundleIdPathSegment","title":"Pro Tools","bundleId":"com.avid.ProTools","eval":"sf.ui.app('com.avid.ProTools')"}]},{"segments":[{"type":"AxCustomPropertyPathSegment","title":"Create Group Dialog","jsPropertyName":"createGroupDialog","eval":"createGroupDialog"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Create Group\"","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Create Group","index":null,"eval":"windows.whoseTitle.is('Create Group').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window of AXWindows","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"windows.first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Create Group\"","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Create Group","index":null,"eval":"children.whoseRole.is(\"AXWindow\").whoseTitle.is('Create Group').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"children.whoseRole.is(\"AXWindow\").first"},{"type":"AxCustomPropertyPathSegment","title":"Focused Window","jsPropertyName":"focusedWindow","eval":"focusedWindow"}]},{"segments":[{"type":"AxElementArrayIndexPathSegment","title":"First Popup Button \"GroupIDView\"","arrayAttribute":"AXChildren","role":"AXPopUpButton","filterAttribute":"AXTitle","filterAttributeValue":"GroupIDView","index":null,"eval":"popupButtons.whoseTitle.is('GroupIDView').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Popup Button \"\"","arrayAttribute":"AXChildren","role":"AXPopUpButton","filterAttribute":"AXDescription","filterAttributeValue":"","index":0,"eval":"popupButtons.whoseDescription.is('').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Popup Button \"d\"","arrayAttribute":"AXChildren","role":"AXPopUpButton","filterAttribute":"AXValue","filterAttributeValue":"d","index":null,"eval":"popupButtons.whoseValue.is('d').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Popup Button","arrayAttribute":"AXChildren","role":"AXPopUpButton","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"popupButtons.first"}]}]}},"menuPath":{"const":["4","a"]}}},{"_type":"ActionNode","actionId":"element.click","title":"Click UI Element","_key":"actionNode6","props":{"element":{"eval":"sf.ui.proTools.createGroupDialog.buttons.whoseTitle.is('OK').first","editor":"AxElementEditor","data":{"segmentGroups":[{"segments":[{"type":"AxCustomAppPathSegment","title":"Pro Tools","jsPropertyName":"proTools","eval":"sf.ui.proTools"},{"type":"AxAppBundleIdPathSegment","title":"Pro Tools","bundleId":"com.avid.ProTools","eval":"sf.ui.app('com.avid.ProTools')"}]},{"segments":[{"type":"AxCustomPropertyPathSegment","title":"Create Group Dialog","jsPropertyName":"createGroupDialog","eval":"createGroupDialog"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Create Group\"","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Create Group","index":null,"eval":"windows.whoseTitle.is('Create Group').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window of AXWindows","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"windows.first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Create Group\"","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Create Group","index":null,"eval":"children.whoseRole.is(\"AXWindow\").whoseTitle.is('Create Group').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"children.whoseRole.is(\"AXWindow\").first"},{"type":"AxCustomPropertyPathSegment","title":"Focused Window","jsPropertyName":"focusedWindow","eval":"focusedWindow"}]},{"segments":[{"type":"AxElementArrayIndexPathSegment","title":"First Button \"OK\"","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":"AXTitle","filterAttributeValue":"OK","index":null,"eval":"buttons.whoseTitle.is('OK').first"},{"type":"AxElementArrayIndexPathSegment","title":"6. Button \"\"","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":"AXDescription","filterAttributeValue":"","index":5,"eval":"buttons.whoseDescription.is('').allItems[5]"},{"type":"AxElementArrayIndexPathSegment","title":"6. Button \"\"","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":"AXValue","filterAttributeValue":"","index":5,"eval":"buttons.whoseValue.is('').allItems[5]"},{"type":"AxElementArrayIndexPathSegment","title":"6. Button","arrayAttribute":"AXChildren","role":"AXButton","filterAttribute":null,"filterAttributeValue":null,"index":5,"eval":"buttons.allItems[5]"}]}]}}}},{"_type":"ActionNode","actionId":"element.waitFor","title":"Wait for UI Element","_key":"actionNode7","props":{"waitType":{"const":"Disappear"},"element":{"eval":"sf.ui.proTools.createGroupDialog","editor":"AxElementEditor","data":{"segmentGroups":[{"segments":[{"type":"AxCustomAppPathSegment","title":"Pro Tools","jsPropertyName":"proTools","eval":"sf.ui.proTools"},{"type":"AxAppBundleIdPathSegment","title":"Pro Tools","bundleId":"com.avid.ProTools","eval":"sf.ui.app('com.avid.ProTools')"}]},{"segments":[{"type":"AxCustomPropertyPathSegment","title":"Create Group Dialog","jsPropertyName":"createGroupDialog","eval":"createGroupDialog"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Create Group\"","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Create Group","index":null,"eval":"windows.whoseTitle.is('Create Group').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window of AXWindows","arrayAttribute":"AXWindows","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"windows.first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window \"Create Group\"","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":"AXTitle","filterAttributeValue":"Create Group","index":null,"eval":"children.whoseRole.is(\"AXWindow\").whoseTitle.is('Create Group').first"},{"type":"AxElementArrayIndexPathSegment","title":"First Window","arrayAttribute":"AXChildren","role":"AXWindow","filterAttribute":null,"filterAttributeValue":null,"index":0,"eval":"children.whoseRole.is(\"AXWindow\").first"},{"type":"AxCustomPropertyPathSegment","title":"Focused Window","jsPropertyName":"focusedWindow","eval":"focusedWindow"}]}]}}}}],"nodes":[]}},"bindings":{},"_packageKey":"cjy7orsth0001km10gr3cte4g","_packageName":"  Decks","_commandKey":"cjycfeu2j0002fa10ffls4yfl","_isCustom":true,"_isInstalled":false,"bindingsText":""},"isCut":false}
                                  
                                  1. Fokke van Saane @Fokke
                                      2019-07-21 07:25:06.122Z

                                      Ok, this works.

                                      Let me think out loud.
                                      I said i need to make group "4a" so we could find it back later when we want to recall a certain group.
                                      But the menu clicking does not look nice. A Create Group is instant.
                                      What also could be possible is that ProTools just makes the group in the first available slot, but the macro stores this slot in a variable.
                                      So, when we create a group, the action should read which group is made (always the last i think) and then at recall, recall this group id. The reason i don't use group name is that a name can be edited, an ID doesn't.

                                      And, i like to add a prompt for the user to add a name.

                                      1. Hi Fokke. Not sure I follow your thoughts here. Can you elaborate? Just trying to show you some ways of doing what I thought you were doing in KM. Are you talking about the Modify Group / Add clicking? Totally happy to do it another way if possible.

                                        1. Fokke van Saane @Fokke
                                            2019-07-21 07:47:43.159Z

                                            Ok. Let me explain.
                                            the final goal is to select track(s) and scroll them into view.
                                            I use Groups for this as new tracks can be added to the group automatically.
                                            To select the tracks part of the group we can click on the left group ID in the group list.

                                            so, i make a button, in my case a Keys stick, for the first group.
                                            I create this group by clicking command+this first XKey.
                                            When i want to scroll to this tracks i click the first XKey

                                            So, by now; thats 2 macro's. One for create, one for recall.

                                            To recall, the macro has to know which group to recall.
                                            I can do this by creating a group that has a known id (but should not exist yet!) That's why i choose 4a.
                                            or, the recall-macro should know which group id was created

                                            1. Alright. I understand that part of it. But I'm not sure if the menu part you were saying felt too slow, if that's a general problem that you also had with KM or if that is because I don't know your steps to automate modifying groups faster than my implementation.
                                              I think if you want a complete 1:1 translation of your KM macros it's easier if you paste them here or explain the exact steps.
                                              I feel like I'm still guessing a little what the exact steps you want to replicate are.

                                              1. I might be mis understanding you here (I never understood your count of 8 actions and then you listed 4 macros in the original post). I was trying to give you examples of automation of number 1 (creating) and 2 (adding). I think it's easier if we take them step by step.

                                                1. Fokke van Saane @Fokke
                                                    2019-07-21 08:02:25.885Z

                                                    I made 8 buttons for 8 groups of sets tracks to recall. Each button has 4 different actions. Of course we start designing it for one group.

                                                    1. Aaaaaaaaah. Haha ok!

                                                  • In reply tochrscheuer:
                                                    Fokke van Saane @Fokke
                                                      2019-07-21 07:58:43.936Z

                                                      What i noticed is, that Create Group with name blablabla is almost instantly and does not pop up the Create Group window. We needed that in order to set our specific ID.
                                                      If we don't do a specific ID but read the auto created ID afterwards, it would be smoother.

                                                      1. In reply tochrscheuer:
                                                        Fokke van Saane @Fokke
                                                          2019-07-21 08:00:12.761Z

                                                          a 1:1 translation of the KM is not wanted; SF is better! :-) I can send it to you, but i want to make it better anyway.

                                                          1. Gotcha. Alright.. Well there are different things to achieve here. I think for educational purposes and to make it easier to talk about it's often good to start by copying the original. And then after that, to improve it.
                                                            But ok maybe a better approach is to discuss the steps first and then implement them?
                                                            I just got confused here. But yea in my opinion there shouldn't be any need for ids in any of it.
                                                            Why do you need them for recalling? Again I think I would understand better if I understood where you're coming from (your original steps)

                                                            1. So yea please send me the KM macros, I'll take a look when I get back at the studio later today, I think that will help me understand where you're coming from and to where we should go. (On my phone typing this again by the way).

                                                              1. So happy to have you testing this Fokke!!

                                                              2. In reply tochrscheuer:
                                                                Fokke van Saane @Fokke
                                                                  2019-07-21 08:10:18.270Z

                                                                  Let me send you the 4 KM scripts for the first key (group 4a in my case). I can also make a video explaining me in voice.

                              2. In reply toFokke:
                                Fokke van Saane @Fokke
                                  2019-07-21 10:30:10.620Z

                                  Ok, I made a video. Its a bit long because i am not used in performing TED talks or YouTube video's. :-)
                                  https://we.tl/t-Gsu1CGYntC

                                  Here is a picture of my Xkeys that i use for this Scroll Into View using Groups.
                                  See that the LED's display the groups that are available. 1, 3, 4, 5 are made.