getting details of other application windows...
getting details of other application windows...
- Subject: getting details of other application windows...
- From: Michael Dautermann <email@hidden>
- Date: Mon, 15 Sep 2003 17:49:26 -0700
hi all,
Please forgive me if this is an inappropriate place to be asking this
question. This has little to do with accessibility but everything to
do with the accessibility API.
I'm working on a Carbon application that needs to be aware of positions
of browser windows (or actually, the bounds of the monitors on which
those windows are placed).
Chris Espinosa had suggested using the accessibility API (
http://groups.google.com/groups?selm=aqhmkb$gci$email@hidden
), and a further search for more info via Google or developer.apple.com
didn't reveal very much info.
So I just tried something simple:
AXUIElementRef theBrowserApp;
AXError theAXerr;
theBrowserApp = AXUIElementCreateApplication( thePID ); // thePID is
valid going in.
theAXerr = AXUIElementGetAttributeValueCount( theBrowserApp,
kAXWindowsAttribute, &count ); // kAXWindowsAttribute is in the
application's context
if( kAXErrorSuccess == theAXerr )
{
PrintToLog( "count of browser windows is %d"\n", count );
}
I never get to the print statement, as what comes back is a -25211
error.... kAXErrorAPIDisabled.
Am I merely using the wrong attribute? or is Accessibility disabled
(or turned off) by default? or does the kAXErrorAPIDisabled signify
that AXUIElementCreateApplication is the wrong way to go (since more
recent documentation seems to indicate there are updated & better
supported APIs used to create AXUIElementRefs such as
AXUIElementCreateWithHIObjectAndIdentifier)?
And in the big picture, am I doing the correct approach here, for
getting info for other application's windows?
thanks for sending me the right direction.
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.