Re: 'kASAppleScriptSuite' undeclared
Re: 'kASAppleScriptSuite' undeclared
- Subject: Re: 'kASAppleScriptSuite' undeclared
- From: Matt Neuburg <email@hidden>
- Date: Sun, 30 Sep 2007 13:07:36 -0700
- Thread-topic: 'kASAppleScriptSuite' undeclared
On Fri, 28 Sep 2007 08:21:42 -0400, Paul Bruneau
<email@hidden> said:
>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
Why not just link against Carbon?
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
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