No internet connection
  1. Home
  2. How to

How to select all tracks in Import Session data window

By Brandon Bost @Brandon_Bost
    2021-03-23 15:51:50.556Z

    I've gotten my import prep template script together...almost. My script points to the right pro tools session on the correct work drive. It opens the import session data prompt and selects the checkboxes I want. I have been able to add a mouse click on the top track in the 'Tracks' portion of the import session data window, but cant seem to figure out how to modify that mouse click into a right click so as to select all tracks from the prep template session.

     //Select all tracks
    sf.ui.proTools.windows.whoseTitle.is('Import Session Data').first.groups.whoseTitle.is("Tracks").first.tables.whoseTitle.is("Source Destination").first.children.whoseRole.is("AXColumn").whoseTitle.is("Source ").first.children.whoseRole.is("AXRow").whoseValue.is("# 0 row  Row is empty.").first.children.whoseRole.is("AXCell").first.children.whoseRole.is("AXStaticText").whoseTitle.is("MASTER (Stereo master)").first.elementClick();
    });
    

    Am I going about this selection the wrong way?

    • 1 replies
    1. samuel henriques @samuel_henriques
        2021-03-23 16:24:20.065Z

        Hello @Brandon_Bost,

        this will click them all, but only if they are visible.

        I had better luck using cmd+a, for select all

        sf.ui.proTools.appActivate()
        //Select all tracks
        const importDataWin =sf.ui.proTools.windows.whoseTitle.is("Import Session Data").first.groups.first.tables.first.children.whoseRole.is("AXRow")
        
        const importDataWinRow = importDataWin.map(x=>x.children.whoseRole.is("AXCell").first.children.whoseRole.is("AXStaticText").first.mouseClickElement());