Re: Enabling Standard AppleScript Support with Cocoa App
Re: Enabling Standard AppleScript Support with Cocoa App
- Subject: Re: Enabling Standard AppleScript Support with Cocoa App
- From: Philip Dow <email@hidden>
- Date: Sun, 29 Jan 2006 20:07:33 +0100
According to both (among others) ...
- http://www.macdevcenter.com/pub/a/mac/2001/12/11/
applescript_intro.html
- http://developer.apple.com/cocoa/applescriptforapps.html
... I should be able to get access to the standard suite and text
suite just by setting that property list key. I don't need script
definitions, etc, just for that. At least I don't for a sample
project that doesn't even have a controller in the main nib.
I'll check out your tutorial though. If any one else has suggestions
in the meantime.
-Phil
On Jan 29, 2006, at 5:11 PM, Matt Neuburg wrote:
On Sun, 29 Jan 2006 12:40:27 +0100, Philip Dow <email@hidden> said:
I am attempting to enable for my app the standard AppleScript support
for cocoa applications in preparation for more advanced scripting.
According to the docs, I should just be able to add a key and value
to my Info.plist file and automatically get that functionality:
<key>NSAppleScriptEnabled</key>
<string>YES</string>
Those must be the docs of my dreams! Unfortunately, this is real
life. You
do need to tell the system that your app is AppleScript-enabled,
but it also
needs to *be* AppleScript-enabled (i.e. it needs a dictionary and
so forth).
My book (now available in a very revised second edition, though the
link in
my .sig still points to the first edition) explains thoroughly what a
dictionary is and how AppleScript works. It also contains a
tutorial that
gets you started adding AppleScript support to a Cocoa application,
and you
can read an early version of that tutorial here:
http://www.tidbits.com/matt/scriptability/scriptabilityTutorial.html
Plus there are many other tutorials available on the net that get you
started. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden