Re: 'kASAppleScriptSuite' undeclared
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