Re: List processes problem
Re: List processes problem
- Subject: Re: List processes problem
- From: "Bryan" <email@hidden>
- Date: Wed, 03 Jan 2001 17:05:32 -0500
There are multiple ways to access the process list,
please see attached html table.
Akua, and others make this easy.
There are apps which will do this as well.
--begin html
<HTML>
<HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html"></HEAD>
<BODY><TABLE BORDER=1>
<TR>
<TH>eventname</TH>
<TH>command</TH>
<TH>OSAXen Name</TH>
<TH>description</TH>
</TR>
<TR>
<TD>«event ScTlgetP»</TD>
<TD>get process</TD>
<TD>Processes</TD>
<TD>get information about a running application</TD>
</TR>
<TR>
<TD>«event ScTllApp»</TD>
<TD>list processes</TD>
<TD>Processes</TD>
<TD>get a list of the running applications</TD>
</TR>
<TR>
<TD>«event ScTlCrAp»</TD>
<TD>get current process</TD>
<TD>Processes</TD>
<TD>determine the name of the currentlty executing process</TD>
</TR>
<TR>
<TD>«event ScTlFrAp»</TD>
<TD>get foreground process</TD>
<TD>Processes</TD>
<TD>get the name of the active application</TD>
</TR>
<TR>
<TD>«event AkunSrrQ»</TD>
<TD>the server processes</TD>
<TD>·Akua Sweets</TD>
<TD>Search for (or let a user choose) a process in the network. (Like
"choose application", but more options).</TD>
</TR>
<TR>
<TD>«event AkusPrcQ»</TD>
<TD>all processes</TD>
<TD>·Akua Sweets</TD>
<TD>Check for a running process by name or creator - or get a list of all
processes.</TD>
</TR>
<TR>
<TD>«event AkusPrcX»</TD>
<TD>frontmost process</TD>
<TD>·Akua Sweets</TD>
<TD>Get/Set the frontmost process. Use to get and restore around idle
actions.</TD>
</TR>
<TR>
<TD>«event AkunSrrQ»</TD>
<TD>the server processes</TD>
<TD>·Akua Sweets</TD>
<TD>Search for (or let a user choose) a process in the network. (Like
"choose application", but more options).</TD>
</TR>
<TR>
<TD>«event AkusPrcQ»</TD>
<TD>all processes</TD>
<TD>·Akua Sweets</TD>
<TD>Check for a running process by name or creator - or get a list of all
processes.</TD>
</TR>
<TR>
<TD>«event AkusPrcX»</TD>
<TD>frontmost process</TD>
<TD>·Akua Sweets</TD>
<TD>Get/Set the frontmost process. Use to get and restore around idle
actions.</TD>
</TR>
<TR>
<TD>«event atp3lPrc»</TD>
<TD>process list</TD>
<TD>Process List</TD>
<TD>Returns the list of all the processes currently running on the local
Macintosh</TD>
</TR>
<TR>
<TD>«event ScTlgetP»</TD>
<TD>get process</TD>
<TD>Processes</TD>
<TD>get information about a running application</TD>
</TR>
<TR>
<TD>«event ScTllApp»</TD>
<TD>list processes</TD>
<TD>Processes</TD>
<TD>get a list of the running applications</TD>
</TR>
<TR>
<TD>«event ScTlCrAp»</TD>
<TD>get current process</TD>
<TD>Processes</TD>
<TD>determine the name of the currentlty executing process</TD>
</TR>
<TR>
<TD>«event ScTlFrAp»</TD>
<TD>get foreground process</TD>
<TD>Processes</TD>
<TD>get the name of the active application</TD>
</TR>
<TR>
<TD>«event YgzPlpro»</TD>
<TD>get processes</TD>
<TD>ProcessWatcher</TD>
<TD>get the processes list</TD>
</TR>
<TR>
<TD>«event YgzPlpro»</TD>
<TD>get processes</TD>
<TD>PWd</TD>
<TD>get the processes list</TD>
</TR>
<TR>
<TD>«event AkunSrrQ»</TD>
<TD>the server processes</TD>
<TD>·Akua Sweets</TD>
<TD>Search for (or let a user choose) a process in the network. (Like
"choose application", but more options).</TD>
</TR>
<TR>
<TD>«event AkusPrcQ»</TD>
<TD>all processes</TD>
<TD>·Akua Sweets</TD>
<TD>Check for a running process by name or creator - or get a list of all
processes.</TD>
</TR>
<TR>
<TD>«event AkusPrcX»</TD>
<TD>frontmost process</TD>
<TD>·Akua Sweets</TD>
<TD>Get/Set the frontmost process. Use to get and restore around idle
actions.</TD>
</TR>
</TABLE></BODY></HTML>
--end html
----------
>
From: steve <email@hidden>
>
To: AppleScript List <email@hidden>
>
Subject: List processes problem
>
Date: Wed, Jan 3, 2001, 3:41 PM
>
>
Hi list,
>
>
I'm having trouble with checking processes with a script that used to work
>
but no longer does. For the life of me I can't figure out what I'm doing
>
wrong or if I'm missing an Addition.
>
>
Basically, I am using an idle handler to check for all necessary processes.
>
If they are not there, I want to re-launch it.
>
>
Here's what I used before:
>
>
on idle
>
tell application "Finder"
>
set running_apps to processes as list
>
if running_apps does not contain "FileMaker Pro" or does not contain
>
"StuffIt Deluxe" then
>
tell application "restart script"
>
activate
>
end tell
>
end if
>
return 30
>
end idle
>
>
I have tried to switch this to
>
>
if running_apps contains process "FileMaker Pro" then
>
>
but I still get an error. What am I doing wrong?
>
>
Thanks!
>
--
>
Steve Kump
>
New Media Development
>
BC Newsgroup
>
34375 Cyril Street
>
Abbotsford, BC
>
Canada
>
(604)870-4520
>
email@hidden
<HTML>
<HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html"></HEAD>
<BODY><TABLE BORDER=1>
<TR>
<TH>eventname</TH>
<TH>command</TH>
<TH>OSAXen Name</TH>
<TH>description</TH>
</TR>
<TR>
<TD>«event ScTlgetP»</TD>
<TD>get process</TD>
<TD>Processes</TD>
<TD>get information about a running application</TD>
</TR>
<TR>
<TD>«event ScTllApp»</TD>
<TD>list processes</TD>
<TD>Processes</TD>
<TD>get a list of the running applications</TD>
</TR>
<TR>
<TD>«event ScTlCrAp»</TD>
<TD>get current process</TD>
<TD>Processes</TD>
<TD>determine the name of the currentlty executing process</TD>
</TR>
<TR>
<TD>«event ScTlFrAp»</TD>
<TD>get foreground process</TD>
<TD>Processes</TD>
<TD>get the name of the active application</TD>
</TR>
<TR>
<TD>«event AkunSrrQ»</TD>
<TD>the server processes</TD>
<TD>·Akua Sweets</TD>
<TD>Search for (or let a user choose) a process in the network. (Like "choose application", but more options).</TD>
</TR>
<TR>
<TD>«event AkusPrcQ»</TD>
<TD>all processes</TD>
<TD>·Akua Sweets</TD>
<TD>Check for a running process by name or creator - or get a list of all processes.</TD>
</TR>
<TR>
<TD>«event AkusPrcX»</TD>
<TD>frontmost process</TD>
<TD>·Akua Sweets</TD>
<TD>Get/Set the frontmost process. Use to get and restore around idle actions.</TD>
</TR>
<TR>
<TD>«event AkunSrrQ»</TD>
<TD>the server processes</TD>
<TD>·Akua Sweets</TD>
<TD>Search for (or let a user choose) a process in the network. (Like "choose application", but more options).</TD>
</TR>
<TR>
<TD>«event AkusPrcQ»</TD>
<TD>all processes</TD>
<TD>·Akua Sweets</TD>
<TD>Check for a running process by name or creator - or get a list of all processes.</TD>
</TR>
<TR>
<TD>«event AkusPrcX»</TD>
<TD>frontmost process</TD>
<TD>·Akua Sweets</TD>
<TD>Get/Set the frontmost process. Use to get and restore around idle actions.</TD>
</TR>
<TR>
<TD>«event atp3lPrc»</TD>
<TD>process list</TD>
<TD>Process List</TD>
<TD>Returns the list of all the processes currently running on the local Macintosh</TD>
</TR>
<TR>
<TD>«event ScTlgetP»</TD>
<TD>get process</TD>
<TD>Processes</TD>
<TD>get information about a running application</TD>
</TR>
<TR>
<TD>«event ScTllApp»</TD>
<TD>list processes</TD>
<TD>Processes</TD>
<TD>get a list of the running applications</TD>
</TR>
<TR>
<TD>«event ScTlCrAp»</TD>
<TD>get current process</TD>
<TD>Processes</TD>
<TD>determine the name of the currentlty executing process</TD>
</TR>
<TR>
<TD>«event ScTlFrAp»</TD>
<TD>get foreground process</TD>
<TD>Processes</TD>
<TD>get the name of the active application</TD>
</TR>
<TR>
<TD>«event YgzPlpro»</TD>
<TD>get processes</TD>
<TD>ProcessWatcher</TD>
<TD>get the processes list</TD>
</TR>
<TR>
<TD>«event YgzPlpro»</TD>
<TD>get processes</TD>
<TD>PWd</TD>
<TD>get the processes list</TD>
</TR>
<TR>
<TD>«event AkunSrrQ»</TD>
<TD>the server processes</TD>
<TD>·Akua Sweets</TD>
<TD>Search for (or let a user choose) a process in the network. (Like "choose application", but more options).</TD>
</TR>
<TR>
<TD>«event AkusPrcQ»</TD>
<TD>all processes</TD>
<TD>·Akua Sweets</TD>
<TD>Check for a running process by name or creator - or get a list of all processes.</TD>
</TR>
<TR>
<TD>«event AkusPrcX»</TD>
<TD>frontmost process</TD>
<TD>·Akua Sweets</TD>
<TD>Get/Set the frontmost process. Use to get and restore around idle actions.</TD>
</TR>
</TABLE></BODY></HTML>