Find Floating Windows?!

Can anyone please help with this?

KM can identify a floating window, if it's at the front, using %FrontWindowName%.

But if the window is not at the front, KM cannot find it (e.g., "Bring Window to Front").

The Open Application will bring the floating window to the front—but only if the application is not active.

Any ideas? Thank you,

1 Like

Which app and which window?

Thank you for asking - your knowledge of KM is legend.

The app is iZotope RX. It seems to be all the floating windows. All KM actions involving the front window work fine. Another wise person here clued me in a few days ago that the problem was that they were floating. I've had some luck writing stuff directly in AppleScript - I think iZotope is doing some non-standard things with their UI - I've noticed this with UI Browser.

If I can get the window ID of the floaters, I'm guessing I can track them with KM.

Anyway, thanks for your questions here.

I have RX so I'll be able to have a look at this tomorrow or Friday. :+1:t3:

Thank you again, @noisneil. Here is more information (screenshots below from my two monitors).

Of note, if iZotope RX is not the active application, then the floating windows do not appear in UI Browser (and indeed they disappear from the screen, as in the second set of screenshots).

THE MYSTERY

KM can always find RX's front window, regardless of if it's floating.

Monitor 1

Other than whichever window has focus, KM cannot find any of the floating windows by name.

SCREENSHOTS - BOTH MONITORS - RX IS ACTIVE - UI BROWSER - KM ACTIONS

Monitor 1

Monitor 2

None of these KM Action instances can find the respective floating windows (except the one in front).

IZOTOPE RX - INACTIVE - BOTH MONITORS - RX IS ACTIVE - UI BROWSER - KM ACTIONS

Monitor 1

Monitor 2

When RX is not active, the floaters disappear. (This is expected of RX.) But sometimes the main window cannot be found by UI browser, even with a refresh. (Only the menu bar is consistent.) I haven't had a problem finding it with KM, but then again I haven't really needed to.

Monitor 1

I don't know if this is a function of UI Browser or not. Clicking "Refresh" doesn't change anything. KM seems to be able to always find the main window, though, even if it's not in focus.

PHANTOM BUTTON

I don't know if this sheds any light: There's a button in RX that's likewise erratic—sometimes it shows up, and sometimes not—and when it's not available, KM can't see it either. But it's no different from any other button, and is always visible and available to the user.

Anyway, thank you for your time and advice.

[deleted]

Give this a go:

Focus Floating Window by Name.kmmacros (44 KB)

Macro screenshot

(Set the green action to the name of the window you want to focus.)

Thank you, kindly. That's wonderful! Sorry it took me a few days to respond—I've been thinking how to apply that to testing for the windows, as well. And then I realized I simply needed to use a try/catch block (i.e., if the window doesn't exist, the "raise" statement throws an error). Thank you again!

Test for Floating Window.kmmacros (46 KB)

Macro screenshot

1 Like

So do you just wake up every day and say, "How can I make everyone's life better?"

1 Like

I certainly try to wake up every day.

:joy:

1 Like