Open Selected File in Dolby Atmos Renderer Master
By David Stagl @David_Stagl
I am trying to select a file in the finder and then open it in the Dolby Atmos Renderer. I've been trying to reverse engineer some different scripts to do this, but I can't get it working. I'm stuck on how to navigate to the file I selected in the finder in the "Open Master File" dialogue.
Nathan Salefski @nathansalefskiThis should do the trick. It will prompt you for the file location, then open that file.
//Activate Renderer sf.ui.app("com.dolby.atmos.renderer").appActivate(); const openWin = sf.ui.app("com.dolby.atmos.renderer").mainWindow.sheets.whoseDescription.is("choose a file").first // Prompt for File with Option To Cancel let importDirectory = sf.interaction.selectFile({ prompt : `Select File to Open`, }).path; //Refresh Cache sf.ui.app("com.dolby.atmos.renderer").mainWindow.invalidate(); //File, Open Master File sf.ui.app("com.dolby.atmos.renderer").menuClick({ menuPath: ["File","Open Master File"], }); //Wait for 'Open' Window to Appear openWin.elementWaitFor(); //Open 'Go' Sheet sf.keyboard.type({ text: '/' }); //Wait for 'Go' Sheet Window to Appear openWin.sheets.first.elementWaitFor(); //Set Destination openWin.sheets.first.textFields.first.elementSetTextFieldWithAreaValue({ value: `${importDirectory}`, //onError: "Continue", }); //Press Return sf.keyboard.press({ keys: "return", }); //Click Open openWin.buttons.whoseTitle.is("Open").first.elementClick();