Where is the Area of the Frontmost Window When it Gets Moved by a Popup?

I'm attempting to use the Find Image On Screen action, looking for a popup button in a warning message from the frontmost app. I'm concerned about the exact nature of where the window for the frontmost app is.

If I have a TextEdit window that is narrower than the warning message popup, and if that window is close to or at the left or right edge of the screen, when the warning pops up, the main window moves left or right so that the popup stays centered and is fully visible. When the popup closes, the main window returns to its original position.

When finding an image in the front window, one of the buttons in the popup, is the Find Image search area the area where the front window started from and returns to, or is it the area where it has moved to, while the popup is visible?

Also, is there a way to refer to the buttons of a popup like this that doesn't depend on finding the image within the bounds of the frontmost window?


Presumably you've tried the Press Button action (or Button condition)? I know some types of floating window aren't "visible" to KM, so maybe this is one of them.

1 Like

Um, no. In two years of poring over the manual and the wiki, I somehow missed that. I’ve been finding and clicking on button images all this time. I just found out that in v10.2 you can now have it wait until the button becomes visible and enabled. I read the 10.2 release notes and I don't remember that. Foo.

I also recently found out about Copy a File. I had been using Execute Shell Script for that. And I recently learned that Search and Replace can replace text in a file and save it back to the source file. I had been using SED inside an Execute Shell Script action.

Two years. It could have been a lot easier. It will be going forward...


No problem. Press a Button works just fine in this case.

1 Like

That was something I requested, as it happens!

1 Like