Re: About the accessibility stuff...
Re: About the accessibility stuff...
- Subject: Re: About the accessibility stuff...
- From: Matthew Formica <email@hidden>
- Date: Mon, 10 Jun 2002 11:57:21 -0700
AppleScript lets you control the model of an application. The upcoming
accessibility API will let you control the UI of an application. "Click on
Button 1" and such is exactly the sort of thing that the accessibility API
will provide. And for the 99% case, no code will have to be added to Cocoa
apps for them to be automatically accessible; and Carbon apps should get a
lot of behavior for free as well. But given all this, it doesn't mean that
this API is necessarily always the best thing to use for automation - if you
just want behavior to be executed, AppleScript is probably the way to go
because you can bypass the GUI - instead of telling the app "switch to this
tab, click this button, in the window that opens, type this text and hit
return," you can just say "do this behavior."
Regards,
Matthew
--
Matthew Formica
DTS Engineer - Dev Tools, Cocoa, Accessibility
Apple Computer, Inc.
email@hidden
Mac OS X Development Tools:
http://developer.apple.com/tools/
Project Builder on the web:
http://developer.apple.com/tools/projectbuilder/
Project Builder FAQ:
http://developer.apple.com/tools/projectbuilder/faq.html
Cocoa docs on the web:
http://developer.apple.com/techpubs/macosx/Cocoa/CocoaTopics.html
Cocoa sample code:
http://developer.apple.com/samplecode/Sample_Code/Cocoa.htm
On 6/7/02 11:17 AM, "Bill Cheeseman" <email@hidden> wrote:
>
on 02-06-07 12:26 PM, Stiphane Sudre at email@hidden wrote:
>
>
> What I'm looking for is a way to run Test scripts like:
>
>
>
> Click on Button 1
>
>
>
> Click on Button 2
>
>
>
> Switch to Tab "something"
>
>
>
> Type text "this is a text"
>
>
>
>
>
> With AppleScript Studio, this is not possible except if you add some
>
> script ability to your application.
>
>
If all you want is to write scripts to control user interface widgets, you
>
should only have to turn on the AppleScriptable flag and add in ASK using
>
PB, then rebuild. No new code required. This will give you the full ASK (AS
>
Studio) terminology dictionary for controlling the app's user interface via
>
AppleScript. This assumes a Cocoa app written to the standard AppKit API.
>
>
You can add functionality to an application using AppleScript Studio, too,
>
but that's going beyond testing. Add ASK; add an AppleScript build phase;
>
use IB to add user controls (menu items, etc.) as desired; write AppleScript
>
scripts using AS Studio to perform the new features; rebuild.
>
>
In either case, access to source is required, and of course it only works
>
with a Cocoa app.
>
>
I'm not sure what the accessibility API will give you that AS Studio doesn't
>
in this regard. You'll get speech when the mouse hovers over a user
>
interface item without changing the code, I think, but that's not much help
>
in a testing environment. I don't know all that much about the accessibility
>
API, but I was under the impression that it makes it possible for users to
>
control widgets using alternative input techniques -- in many cases only if
>
the app developer writes these capabilities into the code using the new API.
>
In other words, it isn't about automation but only about alternative input
>
during normal use of an app. For automation, I believe you will still need
>
to make your app scriptable, but that's really easy with ASK.
>
>
--
>
>
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
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.