Platforms to show: All Mac Windows Linux Cross-Platform

AXUIElementMBS class

Super class: CFObjectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This class represents an element of the User Interface of an application.
Example
// displays the current window title if accessibility is enabled in Mac OS X 10.2 or newer

dim SystemWideElement,FocusedApplicationElement,FocusedWindowElement as AXUIElementMBS
dim FocusedApplication,FocusedWindow,Title as AXValueMBS
dim s as String
dim cs as CFStringMBS

SystemWideElement=AccessibilityMBS.SystemWideAXUIElement
if SystemWideElement<>nil then
FocusedApplication=SystemWideElement.AttributeValue(AccessibilityMBS.kAXFocusedApplicationAttribute)
if FocusedApplication.Type=AccessibilityMBS.kAXUIElementMBSTypeID then
FocusedApplicationElement=new AXUIElementMBS
FocusedApplicationElement.Handle=FocusedApplication.Handle
FocusedApplicationElement.RetainObject

FocusedWindow=FocusedApplicationElement.AttributeValue(AccessibilityMBS.kAXFocusedWindowAttribute)

if FocusedWindow<>nil and AccessibilityMBS.kAXUIElementMBSTypeID=FocusedWindow.Type then

FocusedWindowElement=new AXUIElementMBS
FocusedWindowElement.Handle=FocusedWindow.Handle
FocusedWindowElement.RetainObject

Title=FocusedWindowElement.AttributeValue(AccessibilityMBS.kAXTitleAttribute)
if Title<>nil and Title.Type=kCFStringMBSTypeID then
cs=new CFStringMBS
cs.handle=Title.Handle
cs.RetainObject
msgbox cs.str
end if
end if
end if
end if

e.g. a window, a menuitem or a button.
This class requires Mac OS X 10.2 to work.
Subclass of the CFObjectMBS class.

Super class CFObjectMBS

This class has no sub classes.

Some methods using this class:

Some events using this class:

Some examples using this class:


The items on this page are in the following plugins: MBS MacCF Plugin.


AXObserverMBS   -   AXValueMBS


The biggest plugin in space...