Re: GUI Scripting requierments
Re: GUI Scripting requierments
- Subject: Re: GUI Scripting requierments
- From: Brett Conlon <email@hidden>
- Date: Tue, 11 Apr 2006 11:37:17 +1000
For me Bill's product, UI Browser, is the first place I turn when I want
to know if I can and how to access UI elements.
The 30 day trial period gave me plenty of time to have a play and like it
enough to purchase it.
You can also use Apple's UI Element Inspector to achieve essentially the
same thing but UI Browser is much more friendlier to use and is helpful in
that it can provide you the right code for inserting into your scripts.
Cheers,
Coj
Bill Cheeseman <email@hidden>
on 2006-04-10 8:30 AM, patrick machielse at email@hidden wrote:
> I've noticed that some programs won't support it. The only mention
> I've come across on apple.com says that GUI Scripting works on 'most
> non-Classic' programs.
>
> Obviously, some non-Classic programs don't support it, but which ones?
> Some Java apps, some Carbon apps, some QTApps?
The general rule is that all UI elements that are built using standard
Carbon or Cocoa UI element code are "accessible" and therefore respond to
GUI Scripting. A subsidiary rule is that UI elements using custom code are
also accessible and respond to GUI Scripting -- if the developer adds the
few lines of code that are necessary.
This implies at least the following:
1. Whether a UI element responds to GUI Scripting depends on how the
individual UI element was constructed, not on how the application as a
whole
was constructed. (However, most applications are built with a certain
degree
of internal consistency, so all of their UI elements tend to behave the
same
way in this regard.)
2. Pre-Panther Mac OS X applications that were built using standard Cocoa
or Carbon UI element code "magically" became responsive to GUI Scripting
when run under Panther, even if they weren't rewritten or recompiled. This
is because the necessary code was built into the Cocoa and Carbon
frameworks
that standard UI elements call at run time. (GUI Scripting was officially
introduced as part of Mac OS X 10.3 Panther, although a beta version was
available since Mac OS X 10.2.2 Jaguar -- or was it 10.2.3?)
In the real world, these rules mean that many of the most popular older
applications contain many UI elements that do not respond to GUI
Scripting.
They tend to be built using "legacy" UI element code that doesn't know
anything about accessibility, and their developers tend not to take the
time
to add the custom code needed to make the UI elements accessible.
Applications such as FileMaker Pro and many Adobe and Macromedia
applications have traditionally fallen in this category.
There are also, unfortunately, a number of system frameworks whose UI
elements don't respond to GUI Scripting. These frameworks are used by most
applications to provide various standard dialogs and palettes, and they
tend
not to respond to GUI Scripting, or at least not reliably.
And there are still a couple of bugs in GUI Scripting itself (implemented
in
the System Events application), so some UI elements, which should
automatically respond to GUI Scripting, don't.
I can't tell you anything about Java, because I don't use it.
--
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