[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lisp/Applescript question
- To: Henry Lieberman <email@example.com>, firstname.lastname@example.org
- Subject: Re: Lisp/Applescript question
- From: email@example.com (Tom Bonura)
- Date: Thu, 9 Jun 1994 14:42:34 -0800
- Cc: firstname.lastname@example.org, email@example.com
- Faxphone: 4089748414
- Voicephone: 4089744538
At 1:23 PM 6/9/94 -0400, Henry Lieberman wrote:
>What we want to do is have an Apple Script program send an Apple Event
>to Lisp. Specifically, we want to use the Eval Server in
>ccl:examples;eval-server.lisp to receive events. So we need to
>send an Apple Event of type eval along with a string to eval.
>Tom Bonura suggested use of the "on" command but that does not seem
>to be right.
Here is a bit of applescript which tells Lisp to print "Hi there" on the
You can compile it as an appleScript applet and run and, provided the eval
server is running in MCL, it will execute the format statement:
set s to "(format t " & ascii character of 34 & "Hi There" & ascii
character of 34 & ")"
tell application "MCL" to do script s
The method which I mentioned to you previously involving the "on" syntax
works for sending a raw appleevent of arbitrary type to some application
which does not support scripting ( but does support the event). The "do
script" construct translates into an appleevent of type 'dosc' and should
be convenient for your needs.
>Note that Lisp does not have an aete resource, so is not "scriptable".
>Maybe it should?
In a sense the eval-server code makes MCL scriptable in that it will
execute any string which comes over in the direct param of an appleevent of
type dosc. It really isn't scriptable of course, in the AppleEvent sense -
I'm not sure what terminology LISP would care to define (other than eval of
An open question is: if one built an application in MCL, defined the
application's terminology (in an AETE) and built the appropriate event
handlers, AETEResolve callbacks, would scripting then work? I've never
tried this - anyone else?
Apple Computer, Inc. Advanced Technology Group,
Interactive Media Lab
Intelligent Systems Program
MS 301-3S, 1 Infinite Loop, Cupertino, CA 95104
Phone: (408)974-4538 Fax: (408)974-8414