Bounced files folder
Love this script, but would also love an adjustment.
Go to the Bounced Files folder of the current session.
- Christian Scheuer @chrscheuer2020-04-23 19:47:42.697Z
Which script?
- JJonathan Grossman @Jonathan_Grossman
from the post:
How to do a check IF in the Bounce Window - Bounce Source and Directory - Choose path
Christian Scheuer @chrscheuer2020-04-23 20:00:22.587Z
I'm asking because you asked this question in Pro Tools Session Management where there are 5 variations of the same thing:
"Go to" can mean different things. It is easier to help you if you explain in a bit more detail what exactly you want.
How to do a check IF in the Bounce Window - Bounce Source and Directory - Choose path
I can't get this to fit with your original question. Can you please elaborate?
- JJonathan Grossman @Jonathan_Grossman
Sorry to waste your time here. You already provided the beginning of the script in another question. It must have been an errant post on my part.
- In reply tochrscheuer⬆:JJonathan Grossman @Jonathan_Grossman
I do have script that goes to the current session folder....how do I adjust it to go to the current session's Bounced Files folder? Here's my current script.
function navigateToInDialog(path) { //Get a reference to the focused window in the frontmost app: var win = sf.ui.frontmostApp.focusedWindow; //Open the Go to... sheet sf.keyboard.type({ text: '/' }); //Wait for the sheet to appear var sheet = win.sheets.first.elementWaitFor({ timeout: 500 }, 'Could not find "Go to" sheet in the Save/Open dialog').element; //Set the value of the combo box sheet.comboBoxes.first.value.value = path; //Press OK sheet.buttons.whoseTitle.is('Go').first.elementClick({}, 'Could not click "Go"'); //Wait for sheet to close win.sheets.first.elementWaitFor({ waitForNoElement: true, timeout: 500 }, '"Go to" sheet didn\'t close in time'); } var folderPath = sf.ui.proTools.mainWindow.sessionPath.split('/').slice(0, -1).join('/'); if (sf.ui.frontmostApp.focusedWindow.title.value.match(/open|import/i)) { navigateToInDialog(folderPath); } else { sf.system.exec({ commandLine: 'open "' + folderPath + '"' }); sf.ui.finder.appActivateMainWindow(); sf.ui.finder.windows.first.elementRaise(); } sf.ui.finder.appActivateMainWindow(); sf.ui.finder.windows.first.elementRaise(); sf.ui.finder.windows.first.windowMove({ position: { x: 300, y: 200 }, size: { x: 1600, y: 500 }, })
Christian Scheuer @chrscheuer2020-06-14 10:14:12.886Z
Try this:
function navigateToInDialog(path) { //Get a reference to the focused window in the frontmost app: var win = sf.ui.frontmostApp.focusedWindow; //Open the Go to... sheet sf.keyboard.type({ text: '/' }); //Wait for the sheet to appear var sheet = win.sheets.first.elementWaitFor({ timeout: 500 }, 'Could not find "Go to" sheet in the Save/Open dialog').element; //Set the value of the combo box sheet.comboBoxes.first.value.value = path; //Press OK sheet.buttons.whoseTitle.is('Go').first.elementClick({}, 'Could not click "Go"'); //Wait for sheet to close win.sheets.first.elementWaitFor({ waitForNoElement: true, timeout: 500 }, '"Go to" sheet didn\'t close in time'); } var folderPath = sf.ui.proTools.mainWindow.sessionPath.split('/').slice(0, -1).join('/') + '/Bounced Files'; if (sf.ui.frontmostApp.focusedWindow.title.value.match(/open|import/i)) { navigateToInDialog(folderPath); } else { sf.system.exec({ commandLine: 'open "' + folderPath + '"' }); sf.ui.finder.appActivateMainWindow(); sf.ui.finder.windows.first.elementRaise(); } sf.ui.finder.appActivateMainWindow(); sf.ui.finder.windows.first.elementRaise(); sf.ui.finder.windows.first.windowMove({ position: { x: 300, y: 200 }, size: { x: 1600, y: 500 }, });
- In reply toJonathan_Grossman⬆:Chip Sloan @ChipSloan
Okay. Here's a question. I'm using the "Open Folder of Current Session" command and I like it. I"m wondering if it can be modified with an if / then.
Sometimes I run a second desktop on my mac, you know control arrow slides it over. Often I have my session folder over there open to do things with output files or downloads from clients etc. what I find is that if I have the session folder open in finder on that alternate second desktop the "Open folder" command will not work.
Is it possible to add an if / then thing to check and if the session folder is open on another mac desktop to switch to that desktop, else, run the normal command.
Any ideas?
Chip
- JJonathan Grossman @Jonathan_Grossman
I think this is a Chris question. He helped design the macro and I'm not skilled enough with Java to give you an accurate solution. Good luck with it. I'm sure Chris will be able to solve it in about 2.5 seconds!
- Progress