Accessibility Framework and Python (continued)
Iterating over the children of an accessible is trivial. The following code lists the currently running accessible applications:
for i in range(desktop.childCount): child = desktop.getChildAtIndex(i) print child.name child.unref()
If we have an accessible corresponding to an entry field, queryInterface() can be used to use the Accessibility::Text methods on it:
text = accessible.queryInterface('IDL:Accessible/Text:1.0') print text.getText(0, text.characterCount)