"UI Picker"

Is there a way to make a UI “picker” to visually grab an element to add to a script…

Like this example in Soundflow ,…

The short answer is "no".

The longer answer...

If the UI element is classed as a "button" you might be able to pick it up with a scan from KM's "Press a Button" Action. Not visual and the listed button names aren't always helpful, but it does find a lot of UI elements you might not expect it to.

There's also @noisneil's "UI Browser Lite" macro (see this thread) which can help you create the correct UI element hierarchy for an AppleScript "System Events" call to, for example, simulate a click on a particular element

And, of course, there's the ultimate "visual grab" of screen-capturing an area and then using the "Click at Found Image" Action.

The first two options are application dependent and are helped by good Accessibility support from the app's developers -- not a given, even in Apple's own apps :frowning: And there may be app-specific alternatives you can leverage from within KM, like customisable shortcuts. So it really depends on what you are trying to do and what you are trying to do it in.

2 Likes

Thank you for the very detailed explanation.

As a somewhat “beginner” I’ll stick with the visual grab for now and see how I fair,

Cheers,

Matt