Re: How do I make applescript wait for application to finish before continuing?
Re: How do I make applescript wait for application to finish before continuing?
- Subject: Re: How do I make applescript wait for application to finish before continuing?
- From: Jon Pugh <email@hidden>
- Date: Fri, 20 Jul 2001 13:18:24 -0700
At 1:08 PM -0500 7/20/2001, Dave Fugiel wrote:
>
How do I make applescript wait for
>
application to finish before processing?
Since you've given us precious little detail, I'll deal with two possible scenarios.
One: Watch for the app to quit.
repeat
tell application "Finder"
set p to processes whose creator type = "MSIE"
end tell
if p = {} then exit repeat
end repeat
beep
Two: Watch for the file to be not busy. I use Jon's Commands (surprise!).
repeat
set b to fileIsBusy "disk:folder:file" -- Jon's Commands
if not b then exit repeat
end repeat
beep
In both of these cases, it would be better to use an idle handler so you don't suck massive amounts of CPU time looping, but like I said, you haven't given us much info to work with.
Good luck.
Jon