Re: scriptability of button in interface?
Re: scriptability of button in interface?
- Subject: Re: scriptability of button in interface?
- From: Matt Neuburg <email@hidden>
- Date: Sun, 23 May 2010 06:21:34 -0700
- Thread-topic: scriptability of button in interface?
On Fri, 21 May 2010 18:05:00 +0530, Dan Ribe <email@hidden> said:
>Hi All,
>
>I am working on to make my cocoa application scriptable. I want to automate
>the testing of my application and for that I want all the actions which user
>can performs manually to be scriptable. Like apple script should be able to
>open a dialog, type something in the text box (or any other UI element),
>then save (or perform any action with that dialog as we do manually).
No. That is not what AppleScript is about. AppleScript is about providing a
scripting API to your functionality. You don't use AppleScript to open a
dialog or type something in a text box. You use AppleScript to accomplish
what that dialog accomplishes (e.g. save this file in this place with this
name).
What you are describing is GUI scripting. Your app (if Cocoa) already
responds to GUI scripting. You can use AppleScript to do GUI scripting, but
then it is not your app that is scriptable; it's System Events that is
scriptable, and the Accessibility API is being used to click your app's
buttons etc. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden