AXUIElementMBS class

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

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


💬 Ask a question or report a problem