Re: Problem with GUI Scripting
Re: Problem with GUI Scripting
- Subject: Re: Problem with GUI Scripting
- From: Bill Cheeseman <email@hidden>
- Date: Wed, 30 Nov 2005 17:16:06 -0500
- Thread-topic: Problem with GUI Scripting
on 2005-11-30 7:31 AM, Helmut Fuchs at email@hidden wrote:
> I always thought that GUI scripting would actually have been invented
> to include "legacy" and apps generally unfit for scripting.
Well, it was. As to legacy apps, however, there is no way Apple can retrofit
legacy UI widget code with accessibility features. So, instead, Apple has
made available a handful of functions in a standard API that can be added to
legacy UI widget code to update it and make it accessible, without requiring
the developer to move the entire app forward to Carbon or Cocoa. It's up to
the Adobes of the world to take advantage of this API.
As to Carbon and Cocoa apps, it's quite remarkable that Apple was in fact
able to build the accessibility API into modern UI widget code so that even
apps that were built prior to Jaguar are "accessible" and respond to GUI
Scripting commands when run under Jaguar or newer.
> Using the accessibility API for that purpose surely has its merits
> but seems very limited at the same time. Too bad there seems to be no
> built-in way to really just send a mouse down event at a specific
> screen location instead of trying to perform the "AXPress" action...
There is. Look at the System Events dictionary for the 'click at' command.
Unfortunately, I usually can't get it to work....
> Full keyboard access does not work with the Photoshop dialogs in
> question. Perhaps it's relying in the same mechanisms as GUI
> scripting.
No, I think that would be an unrelated issue.
> "System Events" allows me to retrieve the positions of buttons (in
> most cases at least), so I think it really should be easy to send a
> plain mouse down event on its way. Is there a (simple ;-) way to do
> that without resorting to third-party apps?
See 'click at', above.
--
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