No internet connection
  1. Home
  2. How to

Is there a way to open all the send windows on a selected track?

By joseph @njs24
    2022-01-24 17:08:20.552Z

    I just want to be able to use one shortcut to open all the send windows on the selected track (Something similar to the picture attached). Any help is much appreciated!

    Solved in post #2, click to view
    • 4 replies
    1. Chris Shaw @Chris_Shaw2022-01-24 19:27:32.844Z2023-03-10 00:50:37.812Z

      This should do it

      this will open all sends on the first selected track.
      The send windows will appear where your mouse is positioned.
      If you don't like where they are just reposition your mouse and try again.

      One thing to keep in mind: this script toggles the send windows on and off so if a send is already open it will be closed.

      Thanks for asking for this. It's really useful! You can keep selecting tracks and put their sends wherever you want without having to drag them into position.

      // OPEN ALL TRACK SENDS AT MOUSE POSITION
      sf.ui.proTools.invalidate();
      
      var selectedTracks = sf.ui.proTools.selectedTrackNames;
      
      // get mouse position - this is where the send windows will be displayed
      
      var mousePosition = sf.mouse.getPosition().position
      var outputXPosition = mousePosition.x
      var outputYPosition = mousePosition.y
      
      //Try opening and moving aux windows
      
      for (var x = 1; x < 11; x++) {
              try {
                      // Open Track Send
                      sf.ui.proTools.selectedTrack.trackSendToggleShow({
                              sendNumber: x,
                      });
      
                      // Turn off target button
                      sf.ui.proTools.mainTrackOutputWindow.buttons.whoseTitle.is("Targeted").first.elementClick();
      
                      // Define window variable
                      var win = sf.ui.proTools.mainTrackOutputWindow;
      
                      // Move window
                      win.windowMove({ position: { x: outputXPosition, y: outputYPosition, } });
      
                      // increase next Output window x position by width of current open output window 
                      //  (+1 pixel to prevent overlapping)
                      outputXPosition = outputXPosition + win.frame.w + 1
      
                      //         // If there is an error continue to next send
              } catch (err) { };
      }
      // Re select original selected tracks
      sf.ui.proTools.trackSelectByName({ names: selectedTracks });
      
      Reply1 LikeSolution
      1. Njoseph @njs24
          2022-01-24 20:25:48.684Z

          That is amazing!! Thank you so much!

          1. In reply toChris_Shaw:
            Njoseph @njs24
              2023-03-05 17:03:06.461Z

              Hi Chirs,

              This script has been so helpful. I was wondering if you could use this same principle to open the volume output button on the currently selected tracks where the mouse is positioned.

              Here's a picture to show you what I mean.

              Here is a script that I tried to use for this function. But it doesn't seem to work.

              sf.ui.proTools.invalidate();
              
              var selectedTracks = sf.ui.proTools.selectedTrackNames;
              
              // get mouse position - this is where the send windows will be displayed
              var mousePosition = sf.mouse.getPosition().position;
              var outputXPosition = mousePosition.x;
              var outputYPosition = mousePosition.y;
              
              // Try opening and moving output windows for all track sends
              for (var i = 1; i <= 10; i++) {
                try {
                  // Open send window
                  sf.ui.proTools.selectedTrack.trackSendToggleShow({ sendNumber: i });
              
                  // Turn off target button
                  sf.ui.proTools.mainEditWindow.buttons.whoseTitle.is("Targeted").first.elementClick();
              
                  // Define window variable
                  var win = sf.ui.proTools.mainEditWindow;
              
                  // Move window
                  win.windowMove({ position: { x: outputXPosition, y: outputYPosition } });
              
                  // Increase next output window X position by width of current open output window (+1 pixel to prevent overlapping)
                  outputXPosition += win.frame.w + 1;
              
                } catch (err) { };
              }
              
              // Re-select original selected tracks
              sf.ui.proTools.trackSelectByName({ names: selectedTracks });
              
              

              Thank you so much in advance!

              1. Sorry for the late reply.
                Try this:

                // OPEN ALL TRACK OUTPUT WINDOWS AT MOUSE POSITION
                sf.ui.proTools.invalidate();
                
                var selectedTracks = sf.ui.proTools.selectedTrackNames;
                
                // get mouse position - this is where the send windows will be displayed
                var mousePosition = sf.mouse.getPosition().position
                var outputXPosition = mousePosition.x
                var outputYPosition = mousePosition.y
                
                //Try opening and moving output windows
                selectedTracks.forEach(track => {
                    sf.ui.proTools.trackSelectByName({ names: [track] })
                    try {
                        // Open Track Output Window
                        sf.ui.proTools.selectedTrack.trackOutputToggleShow()
                
                        // Turn off target button
                        sf.ui.proTools.mainTrackOutputWindow.buttons.whoseTitle.is("Targeted").first.elementClick();
                
                        // Define window variable
                        var win = sf.ui.proTools.mainTrackOutputWindow;
                
                        // Move window
                        win.windowMove({ position: { x: outputXPosition, y: outputYPosition, } });
                
                        // increase next Output window x position by width of current open output window 
                        //  (+1 pixel to prevent overlapping)
                        outputXPosition = outputXPosition + win.frame.w + 1
                
                        //         // If there is an error continue to next output
                    } catch (err) { };
                })
                // Re select original selected tracks
                sf.ui.proTools.trackSelectByName({ names: selectedTracks });