No internet connection
  1. Home
  2. Macro and Script Help

Can't navigate to session folder in PT "save a copy" dialog

By DJH @DJH
    2022-04-23 21:44:06.653Z

    Title

    Can't navigate to session folder in PT "save a copy" dialog

    What do you expect to happen when you run the script/macro?

    This macro is supposed to save a copy of the current pro tools session, including audio files, as a subfolder within the curren't session.

    Ultimately, I'd like it to rename the session according to some criteria, but haven't gotten that far yet.

    Are you seeing an error?

    Element was not found....

    What happens when you run this script?

    it successfully goes through each step until it gets to the point where it needs to navigate the save dialog to the session folder. Soundflow does not appear to be understanding its time to do that and appears to be waiting on the windwo to appear (per the command i have to wait until the save window appears). However, not having the "wait" step navigates finder to the session folder, rather than the PT save dialog.

    I suppose i'll get this part settled first, but then i'd like to figure out how to name the session copy according to a few criteria.

    How were you running this script?

    How important is this issue to you?

    Details

    {
        "inputExpected": "This macro is supposed to save a copy of the current pro tools session, including audio files, as a subfolder within the curren't session.\n\nUltimately, I'd like it to rename the session according to some criteria, but haven't gotten that far yet.",
        "inputIsError": true,
        "inputError": "Element was not found....",
        "inputWhatHappens": "it successfully goes through each step until it gets to the point where it needs to navigate the save dialog to the session folder. Soundflow does not appear to be understanding its time to do that and appears to be waiting on the windwo to appear (per the command i have to wait until the save window appears). However, not having the \"wait\" step navigates finder to the session folder, rather than the PT save dialog.\n\nI suppose i'll get this part settled first, but then i'd like to figure out how to name the session copy according to a few criteria. ",
        "inputTitle": "Can't navigate to session folder in PT \"save a copy\" dialog"
    }

    Source

    //Macro converted to script
    
    
    //Calling command "βœ… Activate: PT (MW)" from package "πŸ“¦ My Big Package  πŸ“¦"
    sf.soundflow.runCommand({
        commandId: 'package:cl17diohm00080410ttw65otj',
        props: {}
    });
    
    //Calling command "Clear Unused Regions" from package "πŸ“¦ My Big Package  πŸ“¦"
    sf.soundflow.runCommand({
        commandId: 'package:cl283rcfk00019y1049hr7zcw',
        props: {}
    });
    
    //Calling command "Save Copy In..." from package "undefined" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/ckyu15xww00004v10dq15rpgq")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:cktcnf0ra000x9r109i8wen1u#cktcmq4z0000d9r106j8q9yvf',
        props: {}
    });
    
    sf.ui.proTools.windows.whoseTitle.is("Save Copy In...").first.elementWaitFor({
        waitType: "Appear",
    });
    
    sf.ui.proTools.windows.whoseTitle.is("Save Copy In...").first.checkBoxes.whoseTitle.is("Audio Files").first.elementClick();
    
    sf.ui.proTools.windows.whoseTitle.is("Save Copy In...").first.buttons.whoseTitle.is("OK").first.elementClick();
    
    sf.ui.proTools.windows.whoseTitle.is("Save").first.splitGroups.first.elementWaitFor({
        timeout: 2000,
    });
    
    //Calling command "Navigate to Folder of Current Session" from package "πŸ“¦ My Big Package  πŸ“¦"
    sf.soundflow.runCommand({
        commandId: 'package:cl26kee2h0000ck10igaopgm6',
        props: {}
    });
    
    
    

    Links

    User UID: 5oOYQAmkSMeJJ8UYzehWUfmvCyr1

    Feedback Key: sffeedback:5oOYQAmkSMeJJ8UYzehWUfmvCyr1:-N0NNRtaiXQhg8CkyQyb

    Feedback ZIP

    • 3 replies
    1. D
      DJH @DJH
        2022-04-26 07:39:20.083Z

        Woot! A thousand hours later, lol, I finally got it working. I noticed the command "Navigate to Folder of Current Session" had this line:

        if (sf.ui.frontmostApp.focusedWindow.title.value.match(/open|import/i)) {
        navigateToInDialog(folderPath);

        But the window title that comes up in the save copy of the session dialog is "save", so I included it in a new version of the script:

        if (sf.ui.frontmostApp.focusedWindow.title.value.match(/open|import|save/i)) {
        navigateToInDialog(folderPath);

        And now it works! I'm a coder, haha.

        1. D
          In reply toDJH⬆:
          DJH @DJH
            2022-04-26 07:49:23.466Z

            Could someone help me understand how to script renaming the session copy? Or point me to a resource where i might learn how to do it? I searched the forum but didn't come up with much....

            When prompted to rename the session, I need it to do the following:

            1. I presume I need to direct the script to the correct field "Save As":
            1. Then I need it to remove the "Copy of"

            2. And IF the current title ends with any of the following: MIX.x (x=1,2,3 etc), STEMS, NOTES, I need that removed.

            3. And lastly need it to end with _BACKUP.

            Thanks in advance πŸ™Œ

            1. SSΓΈren Valur @Szren_Valur
                2024-12-05 20:04:03.106Z

                Any fix to this yet? :)
                also looking for