No internet connection
  1. Home
  2. Packages
  3. Pro Tools Session Management

Bounced files folder

By Jonathan Grossman @Jonathan_Grossman
    2020-04-23 17:53:29.376Z

    Love this script, but would also love an adjustment.

    Go to the Bounced Files folder of the current session.

    • 8 replies
    1. Which script?

      1. from the post:

        How to do a check IF in the Bounce Window - Bounce Source and Directory - Choose path

        1. 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?

          1. 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.

            1. In reply tochrscheuer:
              JJonathan Grossman @Jonathan_Grossman
                2020-06-12 21:22:37.364Z2020-06-14 10:13:32.140Z

                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 },
                })
                
                1. 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 },
                  });
                  
          2. Chip Sloan @ChipSloan
              2020-09-12 00:56:27.605Z

              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

              1. 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!

              2. Progress
              3. @chrscheuer closed this topic 2020-04-23 21:48:58.694Z.