• 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
Problem setting a script to check for a running app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem setting a script to check for a running app


  • Subject: Problem setting a script to check for a running app
  • From: "francois.houle" <email@hidden>
  • Date: Wed, 08 Jun 2005 16:48:26 -0400

Hi,

I'm trying to setup as script so it it remains idle in the background until
a specific process ends (and thus disappears form the process list)
Here is what I have for now but I can't figure out why its not working:

tell application "System Events"
    set proc_list to every process
    repeat until proc_list does not contain "Installer"
        if proc_list contains "Installer" then
            quit (delay 0)
        else if proc_list does not contain "Installer" then
            exit repeat
        end if
    end repeat
end tell

Basically I want the script to check continuously to see if the process is
runnign and only exit it once it doesn't run anymore, and only run the rest
of the script once the loop has been exited...
I've tried many variations but can never get it to work properly...

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problem setting a script to check for a running app
      • From: "J. Stewart" <email@hidden>
  • Prev by Date: Re: Binary math operations (and, or, etc.)
  • Next by Date: Re: Search & Replace multiple Paragraph returns
  • Previous by thread: Re: OT & Overlong: The Future of Orphaned Files...
  • Next by thread: Re: Problem setting a script to check for a running app
  • Index(es):
    • Date
    • Thread