No internet connection
  1. Home
  2. How to

Izotope RX Advances Standalone Editor - Macro creation for Processing state

By Stuart McCowan @Stuart_McCowan5
    2021-06-03 10:23:20.687Z

    I'm trying to find the correct macro action to change the instant processing state in RX Editor, I can get soundflow to select the dropdown menu but struggling to find the correct macro action that will select said items, e.g, attenuate or replace etc.

    • 15 replies
    1. samuel henriques @samuel_henriques
        2021-06-03 12:51:23.061Z

        hello @Stuart_McCowan5,

        this is a weird popup.
        this should do it.

        to change menu just change this line like so:

        sf.ui.izotope.appActivate();
        
        const instantProcess = sf.ui.izotope.mainWindow.groups.whoseDescription.is("RX8 Main Window").first.groups.whoseDescription.is("EditorToolbarPanel").first
        
        const popupItem = {
            attenuate: 33,
            deClick: 55,
            fade: 77,
            gain: 98,
            replace: 119
        }
        
        instantProcess.checkBoxes.whoseDescription.is("Instant Process").first.checkboxSet({
            targetValue: "Enable",
        });
        
        // Open Popup
        instantProcess.popupButtons.first.elementClick();
        
        // Select from popup
        instantProcess.popupButtons.first.mouseClickElement({
            relativePosition: { "x": 40, "y": popupItem.gain },
        });
        
        1. Dustin Harris @Dustin_Harris
            2021-06-03 13:43:41.485Z

            Wow, this is so much more elegant than my solution :)

            1. samuel henriques @samuel_henriques
                2021-06-03 13:51:28.204Z

                Thank you Dustin! :)

                1. Dustin Harris @Dustin_Harris
                    2021-06-03 15:23:11.280Z

                    just for fun I made a hybrid of your idea and mine :)

                    selectInstantProcessType("Fade");
                    
                    
                    /**
                    * @param {("Attenuate" | "De-click" | "Fade" | "Gain" | "Replace")} processType - name of instant process menu item
                    */
                    function selectInstantProcessType(processType) {
                    
                        sf.ui.izotope.appActivate();
                        let rxVersion = sf.ui.izotope.activeBundleID.slice(-1);
                        const instantProcess = sf.ui.izotope.mainWindow.groups.whoseDescription.is(`RX${rxVersion} Main Window`).first.groups.whoseDescription.is("EditorToolbarPanel").first
                    
                        const popupItem = {
                            ['Attenuate']: 33,
                            ['De-click']: 55,
                            ['Fade']: 77,
                            ['Gain']: 98,
                            ['Replace']: 119
                        }
                    
                        instantProcess.checkBoxes.whoseDescription.is("Instant Process").first.checkboxSet({
                            targetValue: "Enable",
                        });
                    
                        // Open Popup
                        instantProcess.popupButtons.first.elementClick();
                    
                        // Select from popup
                        instantProcess.popupButtons.first.mouseClickElement({
                            relativePosition: { "x": 40, "y": popupItem[processType] },
                        });
                    }
                    
                    1. samuel henriques @samuel_henriques
                        2021-06-03 16:34:02.741Z

                        Hahahah!!
                        I made this exact thing after I posted, thinking it would be a better way to use it often in a larger script.

                        I was thinking how to fix different versions, and never thought of let rxVersion = sf.ui.izotope.activeBundleID.slice(-1);

                        Awesome!!

                        1. Dustin Harris @Dustin_Harris
                            2021-06-03 16:37:28.589Z

                            This is probably a nicer way to look at it as well:

                                let rxVersion = "RX" + sf.ui.izotope.activeBundleID.slice(-1);
                                const someCode = `Some that needs${rxVersion} Main Window to run...`
                            
                    2. AAlbert Romero @Albert_Romero
                        2023-01-31 19:11:02.182Z

                        Hey Sam!

                        I'm on RX9 and this doesn't work for me...any suggestions? Appreciate the help!!!!

                        1. samuel henriques @samuel_henriques
                            2023-01-31 19:30:26.909Z

                            Try Dustin's version, he made it so it should work on any versions.

                            1. AAlbert Romero @Albert_Romero
                                2023-02-01 22:50:15.777Z

                                Sorry but I'm confused on which and what to exactly take from dustin line of code for turning on instant process and switching to Gain?

                                1. samuel henriques @samuel_henriques
                                    2023-02-04 12:59:14.306Z

                                    Hello Albert,

                                    Dustin's code here: Izotope RX Advances Standalone Editor - Macro creation for Processing state #post-6
                                    To use it,
                                    type F2 with the mouse between to quotes and you'll get all the options.

                            2. S
                              In reply toStuart_McCowan5:
                              Stuart McCowan @Stuart_McCowan5
                                2021-06-03 13:22:58.797Z

                                That's genius - thank you!

                                1. J
                                  In reply toStuart_McCowan5:
                                  Joe DeAngelis @Joe_DeAngelis
                                    2023-05-17 16:25:48.747Z

                                    Hey Sam,

                                    I'm on RX 10 Advanced and I keep getting error below. Any thoughts on what I can change for it to work?

                                    17.05.2023 09:24:03.30 [Backend]: !! Command Error: Gain [user:clbvg1t000005u11041stsxc7:clhrwn2ry00016c102krtivd5]:
                                    CheckBoxAction requires UIElement (Gain: Line 21)

                                    << Command: Gain [user:clbvg1t000005u11041stsxc7:clhrwn2ry00016c102krtivd5]

                                    1. Dustin Harris @Dustin_Harris
                                        2023-05-21 14:51:36.442Z

                                        Hi @Joe_DeAngelis , looks like Isotope changed one of the element names when moving to RX10, try this one and let me know if it works for you?

                                        selectInstantProcessType("Attenuate");
                                        
                                        
                                        /**
                                        * @param {("Attenuate" | "De-click" | "Fade" | "Gain" | "Replace")} processType - name of instant process menu item
                                        */
                                        function selectInstantProcessType(processType) {
                                        
                                            sf.ui.izotope.appActivate();
                                            const instantProcess = sf.ui.izotope.mainWindow.groups.whoseDescription.is("EditorToolbarPanel").first
                                            const popupItem = {
                                                'Attenuate': 33,
                                                'De-click': 55,
                                                'Fade': 77,
                                                'Gain': 98,
                                                'Replace': 119
                                            }
                                        
                                            instantProcess.checkBoxes.whoseDescription.is("Instant Process").first.checkboxSet({
                                                targetValue: "Enable",
                                            });
                                        
                                            // Open Popup
                                            instantProcess.popupButtons.first.elementClick();
                                        
                                            // Select from popup
                                            instantProcess.popupButtons.first.mouseClickElement({
                                                relativePosition: { "x": 40, "y": popupItem[processType] },
                                            });
                                        }
                                        
                                        1. JJoe DeAngelis @Joe_DeAngelis
                                            2023-06-26 20:52:25.728Z

                                            Hey Dustin!
                                            Gave this a shot and it didn't do anything. No error and no selection changes between the Instant Process... Any other suggestions?

                                            Much appreciated!!!

                                            1. Dustin Harris @Dustin_Harris
                                                2023-06-28 13:21:38.620Z

                                                It's working here for me... RX 10.4.1

                                                Do you have this line selectInstantProcessType("Attenuate"); at the top of your script?