Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: '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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.