So when I look at a UI item in UIElementInspector, I see stuff like AXButton. Great, now I want to perform an action on that AXButton, but the problem is I end up doing something like this: (yes I have actually done this, stupid me)
perform action "AXPress" of pop up button 2 of group 1 of group 1 of group 1 of group 3 of UI element 1 of scroll area 1 of group 2...
Now I have to manually try out what button # of what group # of whatever in order to see where that UI item belongs so I can do stuff on it. What I’m wondering is if there’s some less kludgey way of seeing what numbers I should put in, as sometimes I can’t even find where some AXButton is hiding manually.
Yep, UIElementInspector is difficult to use. I don’t use it because it’s too difficult for me. I’d suggest trying UI Browser here.
It’s a lot easier to find the exact path to stuff… but it’s not free. The only other way to find things is to let applescript find it. Suppose you wanted to find a button titled “Press” in a window. You could do something like this…
Obviously sometimes there’s groups in a window (and other stuff), and the button may be in one of them, so you may have to do something like this…
I hope that helps.