[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Info MCL Digest Digest V2 #85



>Date: Wed, 6 Apr 1994 03:34:46 GMT
>From: kardank@ERE.UMontreal.CA (Kardan Kaveh)
>Subject: AppleScript and MCL
>
>Is there any plan to make MCL support AppleScript?
>
>
>
>--
>Kaveh Kardan
>kardank@ERE.UMontreal.CA
>


Sort of depends on what you mean by `support'.  If you are interested in
doing complex things, like defining an aete resource for your MCL
application's terminology, and using it in the manner prescribed by the
applescript api, I think you may be stuck.

But take heart - at the very simpliest level MCL is (sort of) scriptable.
Load the MCL file ccl:examples;eval-server.lisp.  THen, in the applescript
editor create a new script, e.g.:

set s to "(format t " & (ASCII character 34) & "Hello MCL!" & (ASCII
character 34) & ")"

Tell application "MCL" to do script s


When you run the script from the script editor, "Hello MCL!" will be
printed to the listener.  Any result is returned to the client who sent the
script as a string in the reply.

The bit about ASCII... is applescript's way of embedding a string quote in
a string.

On another note, if you are interested in writing, compiling and executing
scripts from within MCL, let me know.  I've some code which might help you
out.



         Tom
....................................
              Tom Bonura
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
....................................