Re: Listing apps in launch order
Re: Listing apps in launch order
- Subject: Re: Listing apps in launch order
- From: Anthony Alireza Abud <email@hidden>
- Date: Sat, 10 Feb 2001 16:43:29 -0500
on 1/28/01 1:33 PM, Bill Cheeseman at email@hidden wrote:
>
on 1/28/01 11:57 AM, Matthew Fischer at email@hidden wrote:
>
>
> 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?
>
>
It isn't that you don't get all your memory back (except in the case of some
>
ill-behaved apps). The problem is that your memory will become fragmented,
>
with two or more smaller free space areas, instead of one larger area. This
>
should only hurt if you try thereafter to launch an application that needs a
>
larger contiguous free space area than any of those you have left, or if you
>
thereafter launch several smaller apps that do fit but which then leave a
>
few fragments of free space that are too small individually to let any
>
application launch.
>
>
In a typical user's experience (use very few apps, shut down every night),
>
this problem will rarely if ever crop up.
>
>
Caveat. The foregoing is based on info I acquired a very long time ago. It's
>
possible that memory management is much smarter now in the classic Mac OS.
>
The problem does not arise at all in Mac OS X.
>
>
I'm not aware of any simple way you can use AppleScript to resolve this
>
issue. There have been several utilities over the years that show you a
>
graphical representation of your current memory space and usage, but I'm not
>
aware that any of them is scriptable in a useful way. A 1998 utility,
>
ProcessWatcher 3.2, is scriptable, but the dictionary doesn't suggest it
>
will tell you what you want to know (the application itself doesn't, either
>
-- it just lists all running processes), and I got errors trying to use the
>
AppleScript commands it does implement. I normally use Memory Mapper 1.5,
>
another 1998 utility, which has a nice graphical representation of your
>
memory map that shows you what you want to know -- but it isn't scriptable.
>
>
You could write a stay-open AppleScript application, with an idle handler
>
that fires every few seconds, to run in the background at all times. It
>
could be written to notice when every new process launches and when it
>
quits, keeping a constantly-updated list of the order in which current
>
processes were launched. With some careful arithmetic, you could probably
>
even record the amount of memory each uses and track the number and size of
>
your free space fragments. But it would be a lot of work for a very small
>
payoff.
>
>
-
>
Bill Cheeseman, Quechee, Vermont <mailto:email@hidden>
>
>
The AppleScript Sourcebook
>
<http://www.AppleScriptSourcebook.com/>
>
Vermont Recipes-A Cocoa Cookbook
>
<http://www.stepwise.com/Articles/VermontRecipes/>
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
I'm somewhat of a novice but if you check the opplication switcher
dictionary you'll see that you can coerce or change the menu in the upper
right corner to display all visible applications in the order in which they
were launched.