Is AXUIElementCreateSystemWide() A Tree I can Parse?
Is AXUIElementCreateSystemWide() A Tree I can Parse?
- Subject: Is AXUIElementCreateSystemWide() A Tree I can Parse?
- From: aaron smith <email@hidden>
- Date: Sat, 1 Aug 2009 17:18:16 -0700
Hey All, quick question. I'm working on a project where I need to get
a reference to all windows. The accessibility API seems the way to go.
I've read most of the documentation I can find for the accessibility
API and I pretty much get it.
However, I can't seem to find if the system wide AXUIElementRef can be
parsed like a tree. Basically, what I think I'm trying to do is
something like this::
(psuedo code)
sysWide = AXUIElementCreateSystemWide();
NSArray *children = NULL;
AXUIElementCopyAttributeValue(sysWide,
(CFStringRef)NSAccessibilityChildrenAttribute, (CFTypeRef *)&children)
for each (child in children)
{
NSString *role = NULL;
AXUIElementCopyAttributeValue( child,
(CFStringRef)NSAccessibilityRoleAttribute, (CFTypeRef *)&role)
if( [role isEqualToString:NSAccessibilityApplicationRole] ){
//look through application children for AXWindowRoles
}
}
Once I get the systemWide element ref I can't get any further.
Any ideas?
Thanks much!
_______________________________________________
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