• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I make applescript wait for application to finish before continuing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >How do I make applescript wait for application to finish before continuing? (From: Dave Fugiel <email@hidden>)

  • Prev by Date: Re: How do I make applescript wait for application to finish before continuing?
  • Next by Date: Tell a script to run within ignore app
  • Previous by thread: How do I make applescript wait for application to finish before continuing?
  • Next by thread: Scripting Addition for PostgreSQL?
  • Index(es):
    • Date
    • Thread