Re: Listing apps in launch order
Re: Listing apps in launch order
- Subject: Re: Listing apps in launch order
- From: Nigel Garvey <email@hidden>
- Date: Mon, 29 Jan 2001 03:01:01 +0000
Matthew Fischer wrote on Sun, 28 Jan 2001 11:57:21 -0500:
>
It's my understanding (feel free to correct me if I'm wrong) that if you
>
don't quit applications in the reverse order of the order they were
>
launched that you don't get back all the memory they have allocated to
>
them. Sometimes if I have a bunch of things running, I can't remember what
>
order they were launched in.
>
>
How would I go about using Applescript to get a list of my currently
>
running applications in the order they were launched?
If you're using the Application Switcher tear-off palette, it can be
scripted to display the app buttons in alphabetical, launch, reverse
alphabetical, or reverse launch orders.
If you're using a script to do the quitting, it *seems* to be that the
Finder's processes are always listed in launch order. (At least, I
haven't been able to disprove it within the past half hour.)
set myPath to path to me
try
tell application "Finder"
set myName to name of myPath
set theApps to (name of every process whose file type is ,
"APPL" and name is not myName) as list
end tell
repeat with i from (count theApps) to 1 by -1
tell application (item i of theApps) to quit
end repeat
on error
end try
("," should be a line-continuation character)
NG