Re: Find All (Scriptable) Applications
Re: Find All (Scriptable) Applications
- Subject: Re: Find All (Scriptable) Applications
- From: Christopher Nebel <email@hidden>
- Date: Thu, 5 Jul 2001 22:59:12 -0700
On Wednesday, July 4, 2001, at 05:08 AM, Rob Jorgensen wrote:
In trying to avoid a recursive routine which looks at every file, I had
considered an attempt to parse the desktop files, but, after making
copies of and viewing these files, I doubt that this is feasible. Does
Mac OS maintain a registry of installed applications? If so, is it
easily accessed and/or parsed?
Mac OS does maintain such a database, but the only straightforward way
to get at it is through a C API. Perhaps some industrious person has
written a scripting addition to do it, but I don't know of one.
The relevant API is the Desktop Database on classic Mac OS, or Launch
Services on Mac OS X. If you've used Script Editor on Mac OS X, you've
probably noticed that "open dictionary" gives you a flat list of
scriptable applications -- it uses Launch Services to build that list.
--Chris Nebel
AppleScript Engineering