Re: cocoa-dev digest, Vol 1 #660 - 14 msgs
Re: cocoa-dev digest, Vol 1 #660 - 14 msgs
- Subject: Re: cocoa-dev digest, Vol 1 #660 - 14 msgs
- From: Steve Evangelou <email@hidden>
- Date: Fri, 5 Oct 2001 12:21:11 -0700
On Monday, October 1, 2001, at 05:24 PM, cocoa-dev-
email@hidden wrote:
Message: 9
From: Daniel Parnell <email@hidden>
To: email@hidden
Subject: Applesript and Cocoa
Date: Tue, 2 Oct 2001 09:22:07 +1000
G'day All,
I've been trying to get a simple Applescript enables app going for a
while now, and I'm having trouble. I can't even get it to respond to
something like
tell application "MyApp" to get its version
Is there some magic option I have to set to tell the system that my
application is scriptable?
Thanks
Daniel
Daniel,
The short answer might be:
To gain access to Cocoa's scripting support, you should do the following:
Include AppKit.framework and Foundation.framework in your
application project (standard procedure for Cocoa applications).
Add the following key to the Info.plist file for your
application:NSAppleScriptEnabled = YES
That's from "Guidelines for Creating Scriptable Applications", one of
the sections in the "Scriptable Applications" topic in the Cocoa
documentation. Available in Cocoa help in Project Builder or at the
website
http://developer.apple.com/techpubs/macosx/Cocoa/CocoaTopics.html
Steve Evangelou,
Apple Technical Publications