• 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: 'kASAppleScriptSuite' undeclared
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'kASAppleScriptSuite' undeclared


  • Subject: Re: 'kASAppleScriptSuite' undeclared
  • From: Paul Bruneau <email@hidden>
  • Date: Fri, 28 Sep 2007 08:21:42 -0400

On Sep 28, 2007, at 2:21 AM, Aby wrote:

Hi Folks,

I want to perform some script calls from my cocoa app.

So started AppleScript with this link

http://developer.apple.com/technotes/tn2006/tn2084.html#TNTAG8

tried this one for passing parameters from myApp

"Listing 2: Using NSAppleScript with a script inside the app's bundle."

but got two 3 errors

error: 'kASAppleScriptSuite' undeclared (first use in this function)
error: 'kASSubroutineEvent' undeclared (first use in this function)
error: 'keyASSubroutineName' undeclared (first use in this function)

How about the declerations??

As another response said, there is a missing header to import. I was in your same boat and didn't know what header to import so I use this code which I found on some sample code on the internet. I can't speak to its correctness since I'm pretty inexperienced, but it does work for me:


#ifndef kASAppleScriptSuite
#define kASAppleScriptSuite 'ascr'
#endif

#ifndef kASSubroutineEvent
#define kASSubroutineEvent 'psbr'
#endif

#ifndef keyASSubroutineName
#define keyASSubroutineName 'snam'
#endif
_______________________________________________

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


References: 
 >'kASAppleScriptSuite' undeclared (From: Aby <email@hidden>)

  • Prev by Date: Re: name that method!
  • Next by Date: Re: very different execution time
  • Previous by thread: Re: 'kASAppleScriptSuite' undeclared
  • Next by thread: Re: 'kASAppleScriptSuite' undeclared
  • Index(es):
    • Date
    • Thread