What actions can I use to select a GUI location by its name, without using the more fragile screen position. Is it Text as variable, OCR, what's the best way to get Keyboard Maestro to read on screen text and use that reading as a way to either select that spot, or move the cursor to the spot and click to select.
Here is the screen:
So just to the right of the image of the woman, there is a a square with a name above it called "Safety". That will always be its name, but its position may change. In order to manually select it, I move the mouse to that position and click.
I am able to do this "Click at Found Image" but the image must be the right size, which could change. Is there a "Click at Found Text" or "Click at Found OCR variable" set of actions?
January 14, 2021, 2:38am
Welcome to the forum!
Unfortunately there are no actions that do what you want.
If you run my window analysis tool, you'll get an idea of what UI elements can be accessed.
Many of these heavy-gui graphics apps use non-standard components and have very little accessibility.
Changes to this version (1.50):
No more chevron-codes to worry about.
In my opinion BBEdit (or its freeware sibling TextWrangler) is a better vehicle for viewing this output than TextEdit. One reason for this is the ability to turn on “Show Tab Stops”, which makes the view of the hierarchy clearer (some other programming editors also have this feature).
Window Analysis Tool for System Events v1.50.kmmacros (7.6 KB)
Thank you for the script. It will save time.
By any chance, do you know if you have 2 identical xKeys 80 key controllers, you can get Keyboard Maestro to recognize them as two different devices? Right now it sees them both as the same device.
January 14, 2021, 3:04am
@peternlewis ⇢ Can you answer his question in post #4?
As far as Keyboard Maestro is concerned the two devices are identical, and a button press on one will be identical to a button press on the other.
As a little more than a matter of interest can you post what UI elements the analysis tool reports?
(I suspect a UI as complex as this is painted directly by the app. If that’s the case then UI Scripting won’t get you far. If it
is composed of UI elements that’s much easier/better to script.)
January 14, 2021, 8:46pm
Not really. It depends upon what System Events sees.
Look here, and you'll get an idea:
Here's what it looks like with “Show Tab Stops” turned on instead of “Show Invisibles”.
Hey guys, thanks for the macros to identify GUI elements. I posted another question in the main "questions" forum.
Trying to figure out how to select a GUI control point that doesn't seem to appear in the GUI UI browsers:
I'm trying to figure out how to find a GUI control point, assign a left click and hold command that can then be used by a Kensington trackball to move that control point, and release after I press a button in the DaVinci Resolve application, Curves group.
I also may be approaching this wrong. Is there another way to do this? Python, JS Node, Command Line?
Is there a way to "browse" shell commands for an application the way UI browser's identify scriptable UI elements?
Don't bother goo…