• 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: Active application - how to tell? One more
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Active application - how to tell? One more


  • Subject: Re: Active application - how to tell? One more
  • From: Graff <email@hidden>
  • Date: Tue, 22 Jun 2004 14:13:13 -0400

You just have to keep polling it to see if it has stopped running. This is best done with an idle handler if you are using an applet but you can also just use a loop and a delay:

----
tell application "System Events"
repeat while ((name of processes) contains "Tex-Edit Plus")
delay 5
end repeat
end tell

display dialog "it closed"
----

This will check every 5 seconds to see if the process "Tex-Edit Plus" has stopped running.

- Ken

On Jun 22, 2004, at 1:41 PM, Peter Mathiessen wrote:

How do I tell System Events to recheck until the process is not running?


Christopher Stone wrote:

You can do something like this:

tell application "System Events"
if exists (process 1 whose name is "Tex-Edit Plus") then
-- Do your thing.
set x to true
end if
end tell


This is ~ 3/100 sec faster on my machine (Dual 867 G4).

tell application "System Events"
set l to (name of processes) as string
end tell

if l contains "Tex-Edit Plus" then
-- Do your thing
set x to true
end if
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Active application - how to tell? One more
      • From: John Stewart <email@hidden>
References: 
 >Active application - how to tell? One more (From: Peter Mathiessen <email@hidden>)

  • Prev by Date: "double tell" / "using terms from" not working?
  • Next by Date: Re: copy full filepath name
  • Previous by thread: Active application - how to tell? One more
  • Next by thread: Re: Active application - how to tell? One more
  • Index(es):
    • Date
    • Thread