Re: GUI scripting 101
Re: GUI scripting 101
- Subject: Re: GUI scripting 101
- From: Bill Cheeseman <email@hidden>
- Date: Wed, 01 Jan 2003 16:56:13 -0500
on 03-01-01 4:14 PM, Christian Boyce at email@hidden wrote:
>
Now we have GUI scripting in AppleScript. I'm trying to understand how
>
it fits in. Should I turn to AppleScript GUI scripting first, or last,
>
or...?
Last, in my view. It's for scripting applications that aren't otherwise
scriptable, and for scripting those features of scriptable applications that
aren't included in the scriptable feature set. If a feature you need is
scriptable without GUI scripting, it's likely to be cleaner and faster to
get at it the traditional way.
>
If I understand the big picture, the idea is that Cocoa user
>
interface items become "reachable" through GUI AppleScripting.
Both Carbon and Cocoa applications can be scripted using GUI Scripting.
Applications that use standard Carbon or Cocoa UI widget code are already
accessible via GUI Scripting, thanks to Apple's having built it into Jaguar.
It is only custom UI widgets that require the developer/publisher to revise
their applications to make them accessible. For example, expect to wait a
while for Microsoft applications to become fully accessible.
>
If this
>
is so, is it reasonable to expect EVERY GUI element in a Cocoa app to
>
be scriptable? Every button, every text area, etc.? I would think so,
>
but I have been reading about people not being able to access some
>
elements, so I wonder.
Most if not all of the current limitations on GUI Scripting exist because
the underlying technology hasn't yet matured. Apple's new "accessibility"
API first saw the light of day in Jaguar. The goal is to make all user
interface widgets in all applications accessible to users with disabilities,
in order to comply with federal law. If you can do it now without a
disability, using the traditional GUI, you will eventually be able to do it
through the accessibility API, as well. Since GUI Scripting is built on top
of the accessibility API, its scope is sure to expand along with the
accessibility API.
>
In any case, I hope that figuring out the item
>
number for buttons and menus etc. is easier than understanding
>
AppleScript dictionaries. Maybe we can open an app up in a mode similar
>
to FileMaker's Layout mode, with interface items numbered. That would
>
be terrific.
PreFab Software's "UI Browser", announced today, will do something similar
to this. It uses an hierarchical browser, like the Finder's column view, to
expose the logical containment structure of scriptable UI widgets. The
logical structure may be more useful than the graphical layout on the screen
for these purposes. Nevertheless, a mechanism for identifying UI widgets by
pointing at them will be added to UI Browser shortly.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.