Re: "running" issues
Re: "running" issues
- Subject: Re: "running" issues
- From: Loren Ryter <email@hidden>
- Date: Sat, 05 Jul 2008 14:38:11 -0400
- Thread-topic: "running" issues
Joe... Brilliant. Thanks a bunch. This is a bit clumsy but this routine
seems to work for maximum Leopard/Tiger cross-compatibility and the best
Leopard speed.
======
property hasleopard : false
property neededapps : {"GrowlHelperApp", "iCal", "Address Book",
"ScreenSaverEngine", "Finder", "iTunes", "No Application"}
property appids : {"com.Growl.GrowlHelperApp", "com.apple.iCal",
"com.apple.AddressBook", "com.apple.ScreenSaver.Engine", "com.apple.finder",
"com.apple.iTunes", "com.test.nothing"}
property theprocs : {}
set hasleopard to (system attribute "sysv") 4176
my check_procs(3)
set result to theprocs
on check_procs(thesecs)
set theprocs to {}
try
with timeout of thesecs seconds
if hasleopard then
repeat with a from 1 to (count appids)
set anapp to (item a of appids)
try
if application id anapp is running then copy (item a
of neededapps) to the end of theprocs
end try
end repeat
else
tell application "System Events" to set theprocs to the name
of every process
end if
end timeout
end try
end check_procs
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden