Where can I learn about Applescript and Revolution?

Ken Ray kray at sonsothunder.com
Wed Oct 9 16:12:01 EDT 2002

Basically you write the AppleScript as a string (either in a variable or
read from a field), and then say:

  do <container> as applescript

So to make the Finder activate, you can say:

put "tell application " & quote & "Finder" & quote" & cr & \
  "activate" & cr & "end tell" into tScript
do tScript as AppleScript

For some cool ways to use AppleScript in Rev, take a look at the AppleScript
section of the Rev Tips and Tricks page on my site:


As far as reacting to appleEvents goes, you trap the "appleEvent" message in
your card or stack script, as in:

on appleEvent tClass, tID, tSender
  switch (tclass& tID)
  case "aevtoapp"
        -- trapped open application appleEvent
  case "aevtodoc"
        -- trapped open document appleEvent
  -- etc.
  end switch
end appleEvent

Hope this helps,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: <RGould8 at aol.com>
To: <use-revolution at lists.runrev.com>
Sent: Wednesday, October 09, 2002 2:39 PM
Subject: Where can I learn about Applescript and Revolution?

> I'm trying to find "Applescript" in the Revolution documentation, and how
> go about making Applescript calls and reacting to Apple Events - - - can
> anyone point me to a web-site or tell me where in the docs I could find
> details on how this is done?

More information about the Use-livecode mailing list