No internet connection
  1. Home
  2. How to

Script to select within audiosuite applications?

By Carlo Scrignaro @Carlo_Scrignaro
    2019-10-01 23:27:21.721Z

    I want to create a script that will send a clip from Pro Tools to RX as "Reference" instead of Repair, but the Click UI macro will not allow me to select/click on either. Same for Auto Align Dynamic/Static mode and Ambience Match's "Output Ambience Only". I think they are not getting recognized as a clickable option.

    Solved in post #4, click to view
    • 10 replies
    1. Hi @Carlo_Scrignaro

      You'll need the Mouse Click Relative to UI Element action, where you can specify a relative position the mouse should click, relative to for example the top left corner of the open audio suite window.
      This would be done in the Macro editor (you can then always copy the resulting action to script by clicking the 3 small dots and choosing "Copy as Javascript").

      1. CCarlo Scrignaro @Carlo_Scrignaro
          2019-10-02 17:15:05.865Z

          Ah I was hoping this would work, but it's not for me :(

          1. @Carlo_Scrignaro, maybe this example will help you - this works for me in RX7 Connect:

            
            sf.ui.proTools.appActivateMainWindow();
            
            var asWin = sf.ui.proTools.getAudioSuiteWindow('RX 7 Connect');
            asWin.elementRaise();
            asWin.mouseClickElement({
                relativePosition: { x: 170, y: 295 }
            });
            
            ReplySolution
            1. CCarlo Scrignaro @Carlo_Scrignaro
                2019-10-02 17:22:10.963Z

                So weird, I basically get this error message whenever I try the Mouse Click Relative to UI Element action (when picking where to click)

                1. I just saw the same one. Where did you click here?
                  I'll log a bug report for this.

                  1. CCarlo Scrignaro @Carlo_Scrignaro
                      2019-10-02 17:26:57.484Z

                      Clicked on "static" in auto align and tried for Output Ambience Only in Audiosuite Amb Match, same for when I tried Reference in Connect :(

                      PS. The script you sent works for selecting Reference in Connect. Building that into another script to send to RX ;)

                      1. Thank you Carlo! We'll take a look at fixing the bug asap. Thank you for verifying the script above worked for you for now.

              • In reply tochrscheuer:
                Dario Ramaglia @dario.ramaglia
                  2019-10-03 08:41:43.014Z

                  Is there a way to reveal the relative position values inside a plugin? How did you find the right values inside RX Connect? Just trying and trying different values?

                  1. I used Ctrl+Shift+Cmd+4 to take a screenshot, it shows you relative values. Then I dragged from the top left corner of the window :)

                    1. This will be fixed in 3.1 :)