Get list of Finder items in a window
Get list of Finder items in a window
- Subject: Get list of Finder items in a window
- From: Daniel Gobera <email@hidden>
- Date: Fri, 2 Mar 2007 23:11:02 -0800
Hi. I recently started exploring Accessibility API and would
appreciate some help.
I need to get the list of Finder windows (that works). For each
window I would like to get the list of items it contains. Is there a
consistent way to do this? It seems like the path to follow depends
on the configuration of each window (icon/list/columns view, with
toolbar, with side bar, etc.), which makes this approach really
fragile. Is there a consistent and safe way to do this? It would be
great if I could ask the window for the list of AXFinderItems directly.
I know this could be done with AppleScript and Apple Events (or
getting the folder contents from the file system for that matter),
but I also need to know which items are selected in each window.
Accessibility gives me this information, while AppleScript only makes
available the selection for the frontmost window.
As a related question, how can I get the URL of the folder of the
window? I know I can get one of the item's URL and just remove the
last component, but what if the folder has no items?
Thanks,
Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden