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: responding to apple events



You can't easily make the scripts in your AppleScript Studio application respond to Apple Events.  You can easily make your app respond to Apple Events using Objective-C, but the Obj-C to AppleScript support is not easy like the AppleScript to Obj-C support (there is no Obj-C equivelent to AppleScript's call method).  It would be great if the sdef would let you specify AppleScript handlers in lieu of Cocoa methods to bind Apple Events.
 
At the bottom of this message I've included Matt's response to my previous question about making AS Studio apps scriptable.


From: applescript-studio-bounces+tophu=email@hidden [mailto:applescript-studio-bounces+tophu=email@hidden] On Behalf Of Justin van Berckel
Sent: Tuesday, April 26, 2005 1:30 PM
To: email@hidden
Subject: responding to apple events

Does any know how to make your program respond to remote apple events? (or any apple events for that matter)


---=----=----=---

Justin van Berckel

QA Software Testing Engineer

Atimi Software

 

-----Original Message-----

From: Matt Neuburg [mailto:email@hidden]

Sent: Friday, April 22, 2005 3:25 PM

To: Christopher Hickman

Cc: email@hidden

Subject: Re: Exposing AppleScript Handlers, Properties, etc. in ASS Apps

On Fri, 22 Apr 2005 13:07:12 -0400, "Christopher Hickman" <email@hidden>

said:

>I saw here <http://developer.apple.com/cocoa/applescriptforapps.html> how to

>expose Objective-C methods to AppleScript using an sdef, but does anyone

>know if you can expose handlers and properties for the scripts in your

>AppleScript Studio app?

You cannot. Your app's dictionary is the ASK dictionary. However, you can

make your app Cocoa-scriptable, and I have shown an example of doing this.

In effect, your app's dictionary is then the ASK dictionary plus any new

verbs and classes defined through Cocoa scripting. The problem then, when a

command comes in, is how to communicate from Cocoa to your AppleScript code,

and that's not so easy either! 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.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden

References: 
 >responding to apple events (From: Justin van Berckel <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.