Re: Accessing Text fields my cocoa app through AppleScripts
Re: Accessing Text fields my cocoa app through AppleScripts
- Subject: Re: Accessing Text fields my cocoa app through AppleScripts
- From: Matt Neuburg <email@hidden>
- Date: Thu, 10 May 2007 09:57:40 -0700
- Thread-topic: Accessing Text fields my cocoa app through AppleScripts
On Tue, 8 May 2007 07:44:05 +0100 (BST), aashish tiwari
<email@hidden> said:
>Hi All,
>i want to add scriptability to my existing cocoa app,
>at least i want my cocoa UI outlets to be accessible
>to AppleScripts.
>
>Buttons of My app's UI are accessible to AppleScripts
>without doing any changes in my application, but
>textfields are not accessible.
I'm afraid I just don't believe you. However, you're not giving anywhere
near enough information here, so it's hard to say for sure what the problem
is. If your buttons are accessible to AppleScripts, it sounds like you're
writing an AppleScript Studio app, or possibly when you say "accessible"
you're using GUI scripting. But unless you describe your application a
little more, or at least show *how* your buttons are "accessible to
AppleScripts" (e.g. show the script that can do this), you're just not
providing the sort of information that allows analysis.
>If any one of you can guide me how to solve this
>problem, currently i am only concerned about accessing
>my UI element through AppleScripts.
>I feel this is possible without creating any .sdef
>dictionary or so, am I right?
No. Well, yes, but only if you are using GUI scripting, or if this is
already an AppleScript Studio application, or if you're using the ASK
dictinary at the least. In other words, maybe *you* don't have to add an
sdef, but there has to *be* a dictionary of some kind, since that is how
AppleScript scripting works. (I have written a book that tells you all about
that, including a chapter on GUI scripting, and a large section of a large
chapter about how to get started adding genuine scriptability to either a
normal Cocoa app or an AppleScript Studio app. It might help you resolve
some of your confusion here.)
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.amazon.com/gp/product/0596102119>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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