OS X - list all open documents

Terry Judd tsj at unimelb.edu.au
Thu Mar 5 18:09:46 EST 2009


Hi Jim 0 This might be a round about way but...
You could use applescript to

1. Get the name of every application process

Tell application "system event" to get the name of every application process

2. parse the list, then weed out the background apps via

Tell application "system event" to get the background only of process
<<processname>>

And finally...

3. Tell application "system event" to get the name of every document of
process <<processname>>

Just be aware that not every application will necessarily yield up a full
list of documents using this approach. Safari for example will only give you
the title of the active tab in each window and Firefox will probably give
you nothing. If you want more then you may have to resort to iterating
through a processes windows and attempting to capture the relevant
information through one or other of the window's properties. I've probably
got some routines that might help if you want to go down that path.

Regards,

Terry..


On 6/03/09 8:48 AM, "Jim Sims" <sims at ezpzapps.com> wrote:

> Anyone know how I can get a list of all open application documents
> with terminal or applescript (or any other method) on OS X Leopard?
> 
> 
> sims
> 
> sims at ezpzapps.com
> Skype:   sims.jim
> iChat:   techietours
> ______________________
> Opportunity by Design
> 
> 
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list