Re: Contextual Menu items using System Events
Re: Contextual Menu items using System Events
- Subject: Re: Contextual Menu items using System Events
- From: Bill Cheeseman <email@hidden>
- Date: Fri, 24 Feb 2006 17:29:18 -0500
- Thread-topic: Contextual Menu items using System Events
on 2006-02-24 4:23 PM, kai at email@hidden wrote:
> To be honest, this looks suspiciously like one of those rough edges
> in UI scripting to me. (I've come across one or two other situations
> where Accessibility Inspector confirms the existence of a UI element,
> but which is evidently not possible to access from a script.)
These situations are almost always caused by what I call a parent-child
mismatch in Apple's accessibility code. In theory, the accessibility
hierarchy should always appear the same looking up from the root node and
looking down from a leaf node. Sometimes, however, a node is left out in one
direction or the other. The result is that an application that looks down
from a leaf node (such as UI Element Inspector, which is essentially a
screen reader) doesn't see the same path as an application that looks up
from the root node (such as PreFab UI Browser's main browser view, and the
GUI Scripting feature of the System Events application).
Apple has been pretty good about fixing these mismatches when they're
reported, but major application developers have been less responsive.
Since UI Browser and GUI Scripting generally do it the same way, if UI
Browser can't see an element then GUI Scripting can't see it, either. But UI
Element Inspector might nevertheless see it, because it's looking through
the other side of the mirror.
There are other situations where UI Browser can see an element but GUI
Scripting can't. Those are always due to bugs in GUI Scripting, of which
there are still one or two.
Sad to say, there are a couple of situations where GUI Scripting works right
but UI Browser doesn't. I'm still working on these. :(
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden