[Openmcl-devel] Applescript

Dan Knapp dankna at accela.net
Mon Feb 7 20:25:06 PST 2005

   I forget who mentioned Applescript, but I just thought I'd point out 
this blog entry
in case not everybody reads Planet Lisp:


   The relevant code snippet is:

(defun make-volume-up ()
   (let ((vu-event (make-instance 'ns:ns-apple-script
     :init-with-source #@"tell application \"iTunes\"\
  to set sound volume to (sound volume + 10)")))
     (send vu-event :compile-and-return-error
     (defun volume-up ()
       (send vu-event :execute-and-return-error

   It doesn't look at all difficult to turn this into a general-purpose 
framework for
calling Applescript.  Of course it would be nice to have things like 
Lisp wrappers
for the dictionary functions, but really, those could come later.  This 
still leaves
the hard part, which is making it so OpenMCL apps can be controlled by 

-- Dan Knapp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1459 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20050207/529c1bb3/attachment.bin>

More information about the Openmcl-devel mailing list