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

Name, Print, and Export Mix for Client to review

By @paulmagurany
    2024-01-11 20:45:33.751Z

    Title

    Name, Print, and Export Mix for Client to review

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

    Trying to automate my mix print and export so I can walk away while it prints. Once it's done printing, I'd like it to automatically load into dropbox.

    Are you seeing an error?

    What happens when you run this script?

    Everything happens as I expect it to, I just can't figure out how to tell the Destination Directory how to look at Dropbox

    How were you running this script?

    I used a Stream Deck button

    How important is this issue to you?

    5

    Details

    {
        "inputExpected": "Trying to automate my mix print and export so I can walk away while it prints. Once it's done printing, I'd like it to automatically load into dropbox.\n",
        "inputIsError": false,
        "inputWhatHappens": "Everything happens as I expect it to, I just can't figure out how to tell the Destination Directory how to look at Dropbox",
        "inputHowRun": {
            "key": "-MpfwmPg-2Sb-HxHQAff",
            "title": "I used a Stream Deck button"
        },
        "inputImportance": 5,
        "inputTitle": "Name, Print, and Export Mix for Client to review"
    }

    Source

    // Get session name
    const sessionName = sf.ui.proTools.mainWindow.sessionPath
        .split("/").slice(-1).join() // Get file name
        .match(/(.*).ptx$/)[1] // Get session name
    
    // // Copy it to the clipboard
    sf.clipboard.setText({
        text: sessionName
    });
    
    sf.ui.proTools.selectedTrack.trackOpenRenameDialog();
    
    sf.keyboard.press({
        keys: "cmd+v",
    });
    
    sf.keyboard.press({
        keys: "return",
    });
    
    sf.wait({
        intervalMs: 100,
    });
    
    sf.keyboard.press({
        keys: "shift+r",
    });
    
    sf.wait({
        intervalMs: 100,
    });
    
    //Record Enable
    sf.ui.proTools.mainWindow.transportViewCluster.transportButtons.recordEnableButton.elementClick();
    
    //Play to start record
    sf.ui.proTools.mainWindow.transportViewCluster.transportButtons.playButton.elementClick();
    
    while (true) {
    
        if (sf.ui.proTools.isPlaying) {
    
            sf.wait()
    
            log("is playing")
        } else {
    
            log("stoped")
            break;
        }
    }
    
    sf.ui.proTools.clipSelectNextFullClip();
    
    sf.wait({
        intervalMs: 100,
    });
    
    //Calling command "Rename..." from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckw2p6vpz0002ik10txjjtvhs#ckw2wdejo000uik103hef958b',
        props: {}
    });
    
    sf.keyboard.press({
        keys: "cmd+v",
    });
    
    sf.keyboard.press({
        keys: "return",
    });
    
    sf.wait({
        intervalMs: 1000,
    });
    
    sf.keyboard.press({
        keys: "cmd+shift+k",
    });
    
    
    

    Links

    User UID: 346lyVMFSYTnmieq45YUZnVV0by2

    Feedback Key: sffeedback:346lyVMFSYTnmieq45YUZnVV0by2:-NnuGTFrbUw_BtayjOyx

    Feedback ZIP: V4wwTNR38kAa5/3azQ6hjEQUvBXhsX85AFnPQ7FtZOB8dJCVXCGACCqXzD4ojNZgWqNVlXAxalH5SaPzKkH7BRLd84HjXR8lZuXAx55tW01tSiJBFtbJZyvq0c78ikrHMWhu0/+JDKGLOb+Tvc3LjQi5PR/2cRQuzmqXSqPI5b0ZLpYJY9dn8kpCjFGPxtH9xoLHdQhazFRCHStEuzEFKs+yUds9dcYqJg+L9ErfRWYx9v/lqnDAK3DNIhJ6OIXYdnHWJWYj/6k5Jf74EtxAgZ4jOigZfrcJOzXjy3OtQlIC13GHXrDvcJcIe6c1UjDAUP9Zdsuw7wxHLPfR0PGr3iJEIIT78T5S15dF4FlK6fs=

    • 1 replies
    1. L
      Lukas paschke @Lukas_paschke
        2024-08-08 17:05:36.202Z

        its great thank you very much. Is there any chance of change the name of every print? Like when I print the first time everything works fine. But when I want to print a v2 I get the message, that the name is already used by another file and it stops. Is there any chance of automatically adding a v1,v2,v3 etc after every print that this error doesnt appear anymore?