• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Is AXUIElementCreateSystemWide() A Tree I can Parse?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Is AXUIElementCreateSystemWide() A Tree I can Parse?
      • From: aaron smith <email@hidden>
  • Next by Date: Re: Is AXUIElementCreateSystemWide() A Tree I can Parse?
  • Next by thread: Re: Is AXUIElementCreateSystemWide() A Tree I can Parse?
  • Index(es):
    • Date
    • Thread