Set Import AAF or Import Video to go to directories...
By Randall Smith @Randall_Smith
Hello All,
I would like to set up two different scripts that do something similar.
When I import an AAF (PT 2020.12) I would like it to open $Session Dir/AAFs.
When I import a QT file, I would like the open dialogue to default to //volume/Quicktime
I can get the $Session Directory and + "/" + "AAF" so that an alert gives me the correct directory (in both cases).
While not the cleanest, I was able to get this to work with EdiLoad:
let folderPath = sf.ui.proTools.mainWindow.sessionPath.split('/').slice(0, -1).join('/');
let folderPathEDL = folderPath + "/" + "01 AAF EDL";
//alert(folderPathEDL);
sf.app.launch({
path: "/Applications/EdiLoad/EdiLoad v3.4.5.app",
});
sf.ui.app('com.soundsinsync.ediload').appActivate();
sf.wait();
sf.ui.app('com.soundsinsync.ediload').mainWindow.children.whoseRole.is("AXMenuButton").whoseTitle.is('Import').first.popupMenuSelect({
menuPath: ["EDL File - New"],
});
sf.keyboard.press({
keys: "slash",
});
sf.keyboard.press({
keys: "backspace",
});
sf.keyboard.type({
text: folderPathEDL,
});
sf.keyboard.press({
keys: "enter",
});
When I attempt this in Pro Tools, the 'Open' windows won't focus so the keyboard commands don't work.
What am I doing wrong?
Thanks,
Randall
- Christian Scheuer @chrscheuer2021-01-20 02:16:55.508Z
Hi Randall,
Take a look at the script "Navigate to Session Folder" (typing this from memory, can't fully remember the name) in the Pro Tools Utilities package for inspiration on how to navigate to folders.
You can also check for example this thread: