We Recommend

Beginning AppleScript (Programmer to Programmer) Beginning AppleScript (Programmer to Programmer)
Geared toward programmers with no prior development knowledge, Beginning AppleScript serves as a comprehensive guide to using AppleScript on the Mac OS X platform. This title introduces the reader to AppleScript, and then illustrates how to efficiently start writing scripts through sample programs as each concept is introduced.


Ballyhoo


Posted By

katz on 07/26/06


Tagged

applescript


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

xaviaracil
splorp


Loop until specified application quits


Published in: AppleScript 


This example is the loop that waits until "mi.app" is quitted.


  1. repeat
  2. try
  3. do shell script "ps -auxw | grep '[ m]i\.app'"
  4. on error
  5. exit repeat
  6. end try
  7. delay 1
  8. end repeat

Report this snippet 

You need to login to post a comment.