Good afternoon - calling all UI scripters, calling all UI scripters!
Has anyone else noticed that Accessibility Inspector gives a different result from UI Browser in some instances?
For example, in the very misbehaving UI app I am scripting, the window indexes often change, windows are not named, mostly all (except main window) are “AXunknown”, etc. In UI Browser I constantly have to update the screen to refer to the current window index when I make changes in the app itself (like, collapsing a palette). It doesn’t seem to “remember” the UI Element, which is fine - they may have done it that way to ensure compatibility with GUI scripting, I don’t know. In any event, locating the same exact element in Apple’s Accessibility Inspector “locks on” to that UI element, and even if I collapse window palettes, move them around, change to a different view within that window entirely, etc etc, it still can perform actions on that UI element, even if it’s totally hidden. This is extremely, extremely nice and would solve all my problems in a heartbeat. Alas, I cannot figure out how to “latch” onto a UI Element in applescript, so my code currently goes thru and searches for the UI element each and every time. Also the code does not work if the window palette is collapsed. In other words if the UI Element is hidden, the script won’t perform the requested action (for example, click a button to increment a value).
I wonder if there’s a method like Accessibility Inspector uses to latch onto UI Elements that we can use in our applescripts, or is this just something we’ll have to deal with until better UI support comes along?
I’m quite new to this, and I could be vastly mistaken, but it seems like the UI scripting community is still in its infancy. It would be nice if there was a UI scripting specific board, or website, or something. Thoughts?