Applescript variable contents

Sarah Reichelt sarahr at
Tue Mar 12 17:52:01 EST 2002

> I want to run a series of Applescripts from within a Rev standalone
> and have the variable values carry across from one Applescript to
> another. Is there a way to capture Applescript variable values into
> Revolution and then back to Applescript? (other than using a text
> file as an intermediary!)

Here is a way that has been suggested before and seems to work well: use
"replace" to insert your variables into place holders in the AppleScript
before you "do" it.


-- AppleScript stored in a field or property
tell application "Finder"
   set newVar to *myVar*
   display dialog "Double: " & newVar * 2
end tell

-- button that calls it after setting the variable
on mouseUp
  put fld 1 into theScript
  replace "*myVar*" with 5 in theScript
  do theScript as AppleScript
end mouseUp

> The overall goal here is to use Revolution to provide a window and a
> progress bar to a running Applescript.  I'm also trying to figure out
> how to launch an app (the Apple System Profiler) in a hidden way so
> the user doesn't have to see it.
I don't know how to do this, but there was a complaint yesterday that "lock
screen" locks the whole screen and not just the winodw. Perhaps this would
hide your app while you open & close it.


More information about the use-livecode mailing list