• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Enabling Standard AppleScript Support with Cocoa App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Re: Enabling Standard AppleScript Support with Cocoa App (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: -[NSAttributedString initWithPasteboard:...] vs. Dictionary
  • Next by Date: Core Data: updating a key dependent on a to-many relationship?
  • Previous by thread: Re: Enabling Standard AppleScript Support with Cocoa App
  • Next by thread: Re: Enabling Standard AppleScript Support with Cocoa App
  • Index(es):
    • Date
    • Thread