Platforms to show: All Mac Windows Linux Cross-Platform

Back to AXUIElementMBS class.

AXUIElementMBS.ActionDescription(action as CFStringMBS) as CFStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the description of the action with the given name.

Returns nil on any error.

Some examples using this method:

AXUIElementMBS.ActionNames as CFArrayMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
An CF array with all the possible action names.

Returns nil on any error.

Some examples using this method:

AXUIElementMBS.AttributeNames as CFArrayMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a CF array with all the possible attribute names.

AXUIElementMBS.AttributeValue(attribute as CFStringMBS) as AXValueMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the value of an attribute.

AXUIElementMBS.AttributeValues(attribute as CFStringMBS, minindex as Integer, maxindex as Integer) as CFArrayMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the values of an attribute as a CF array.

AXUIElementMBS.ElementAtPosition(x as single, y as single) as AXUIElementMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the element which is on the given position.

e.g. on a window.

AXUIElementMBS.GetAttributeValueCount(attribute as CFStringMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Counts how much attributes of the given name exists.

Some examples using this method:

AXUIElementMBS.IsAttributeSettable(attribute as CFStringMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns true if the attribute with the given name is setable.

Returns false on any error.

Some examples using this method:

AXUIElementMBS.PerformAction(action as CFStringMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Performs a named action.

AXUIElementMBS.PostKeyboardEvent(keyChar as Integer, virtualKey as Integer, keydown as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Posts a keyboard event.
Example
// For example, to produce a 'Z',
// the SHIFT key must be down,
// the 'z' key must go down,
// and then the SHIFT and 'z' key must be released:

dim a as AXUIElementMBS
// get the element

a.PostKeyboardEvent( 0, 56, true ) // shift down
a.PostKeyboardEvent( asc("Z"), 6, true ) // 'z' down
a.PostKeyboardEvent( asc("Z"), 6, false ) // 'z' up
a.PostKeyboardEvent( 0, 56, false ) // shift up

You can only pass the root or application uielement.
The KeyCodesMBS class may help you to find the correct codes.

Synthesize keyboard events. Based on the values entered, the appropriate key down, key up, and flags changed events are generated.
If keyChar is NUL (0), an appropriate value will be guessed at, based on the default keymapping.

All keystrokes needed to generate a character must be entered, including SHIFT, CONTROL, OPTION, and COMMAND keys.

To find the virtual keys, well check the RB documentation for the keyboard class.

AXUIElementMBS.ProcessID as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The Process ID of an application.

The unix PID.

AXUIElementMBS.SetAttributeValue(attribute as CFStringMBS, value as CFObjectMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Accessibility MBS MacCF Plugin 3.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the value of an attribute.

Changed type of value to CFObject in plugin version 6.3. Before it was an AXValue.

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


The biggest plugin in space...