Re: window number accessible through accessibility system
Re: window number accessible through accessibility system
- Subject: Re: window number accessible through accessibility system
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 01 May 2006 18:07:39 -0400
- Thread-topic: window number accessible through accessibility system
on 2006-05-01 4:52 PM, Ian Archer at email@hidden wrote:
> The AppKit function NSWindowList will give a list of window numbers in
> an front-to-back order. This is the only way to globally distinguish
> window depths in a legal (i.e. not through private API) fashion. I'd
> like to use this info to augment the accessibility I am offering but
> the accessibility API doesn't seem to offer such information.
>
> Programmatically, two windows with the same dimensions and location
> will appear identical through the accessibility API. This is not
> sufficient for my needs.
The accessibility API implements an AXWindows attribute on the root
application UI element of any Carbon or Cocoa application. This gives you a
list of all the open windows in the application. Each window element in the
list has a number of attributes, including the window's title, its location
and size, and its index (current front-to-back order), and lots of other
information that lets you distinguish between different windows. The
accessibility API is completely legal and public since Mac OS X 10.2.0
(Jaguar).
To use the accessibility API to get this information, you use one of the
functions to create an application UI element (type AXUIElementRef), then
get its attributes using other functions.
You can see all this in action, and explore it, using Apple's free
Accessibility Inspector utility, or download the 30-day trial version of
PreFab UI Browser from www.prefab.com/uibrowser/.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
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