Rev && appleScript
Sarah Reichelt
sarah.reichelt at gmail.com
Tue Jan 13 15:46:52 EST 2009
On Wed, Jan 14, 2009 at 4:29 AM, Timothy Miller
<gandalf at doctortimothymiller.com> wrote:
> When I
>
> do <container> as "applescript"
>
> is it possible for applescript to pass a variable or function or something
> back to rev?
>
> For instance, just to keep it simple, could I somehow use "the result" from
> appleScript in a Rev script?
Yes, you can. Have the AppleScript end with a "return" and in Rev,
check "the result".
> If someone can applescript off the cuff and is feeling generous, I want to
> use Rev to check if "/applications/firefox.app" is running. Suggestions
> received gratefully.
Here is my function for checking any application:
function isAppRunning pAppName
put "tell application " & quote & "System Events" & quote & cr into tScript
put "return (exists application process " & quote & pAppname &
quote & ")" & cr after tScript
put "end tell" after tScript
do tScript as AppleScript
return the result
end isAppRunning
HTH,
Sarah
More information about the use-livecode
mailing list