make Rev standalone wait for external app
Sarah Reichelt
sarah.reichelt at gmail.com
Wed Mar 7 19:11:25 EST 2007
On 3/8/07, Chris Sheffield <cmsheffield at gmail.com> wrote:
> On OS X 10.4.8, Rev 2.8 gm3. I need to launch an external app
> (installer) from my Rev standalone. I need my standalone to wait for
> the app to close before continuing. What's the best way to do this?
> I've tried several different things including using the launch
> command, using the shell() function, and using the "open application"
> command via AppleScript. Nothing seems to work. My standalone
> continues on immediately following the code to open the external app.
>
> Is there some other way? Or will it be necessary to just sit in a
> repeat loop, watching for the application to quit. Any help is
> appreciated.
>
I think you have already solved your problem, but here is the handler
I use on OS X to determine whether an application is running:
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
(watch for line-wraps)
Cheers,
Sarah
More information about the use-livecode
mailing list