No internet connection
  1. Home
  2. How to

Trying to get a value from RX10 Loudness control module; the description changes every time app starts

By John T @John_T
    2023-12-21 07:50:58.220Z2023-12-21 09:25:52.500Z

    Heading

    Hi, I'm writing code to read the "Integrated Loudness" value of a clip within iZotope RX10 Advanced in the Loudness Control module.

    Using the element pick, I'm able to write this:

    var LUFSval = sf.ui.izotope.windows.whoseTitle.is("Loudness Control").first.groups.whoseDescription.is("39A3F9C7-986F-4873-BFF8-333837536990").first.children.whoseRole.is("AXStaticText").allItems[1].value.invalidate().value;
    

    However, the number within "first.groups.whoseDescription.is("39A3F9C7-986F-4873-BFF8-333837536990") changes every time I restart RX10.

    Is there a way around needing that number?

    Thanks!!

    Solved in post #4, click to view
    • 3 replies
    1. Dustin Harris @Dustin_Harris
        2023-12-21 17:08:00.122Z

        I'm not sure how consistent this will be, but give it a shot?

        const targetGroup = sf.ui.izotope.windows.whoseTitle.is("Loudness Control").first.groups.allItems.filter(group => group.children.whoseRole.is("AXStaticText").whoseDescription.is("MeterValue").first.exists)[1]
        log(targetGroup.children.whoseRole.is("AXStaticText").whoseDescription.is("MeterValue").first.value.invalidate().value)
        
        1. Dustin Harris @Dustin_Harris
            2023-12-21 19:33:24.895Z

            this will likely be more reliable:

            function getLoudnessControlIntegratedValue() {
                const loudnessControlWin = sf.ui.izotope.invalidate().windows.whoseTitle.is("Loudness Control").first;
                const lcFrame = loudnessControlWin.frame;
                const targetGroup = loudnessControlWin.children.allItems.filter(i => i.frame.x == lcFrame.x + 211 && i.frame.y == lcFrame.y+156)[0];
                const integratedLoudnessValue = targetGroup.children.whoseRole.is("AXStaticText").whoseDescription.is("MeterValue").first.value.invalidate().value;
            
                return integratedLoudnessValue
                
            }
            
            
            const integratedLoudnessValue = getLoudnessControlIntegratedValue();
            log(integratedLoudnessValue)
            
            1. In reply toDustin_Harris:
              JJohn T @John_T
                2023-12-22 05:00:04.079Z

                Thanks!!

                This is what ended up working:

                const targetGroup = sf.ui.izotope.windows.whoseTitle.is("Loudness Control").first.groups.allItems.filter(group => group.children.whoseRole.is("AXStaticText").whoseDescription.is("MeterValue").first.exists)[1]
                const integratedLoudnessValue = targetGroup.children.whoseRole.is("AXStaticText").whoseDescription.is("MeterValue").first.value.invalidate().value;
                

                Thanks for your help!! Cannot figure out the 'children' thing in javascript.

                ReplySolution