AXUIElementCopyAttributeValues(_:_:_:_:_:)
Returns an array of attribute values for the accessibility object's attribute, starting at the specified index.
Declaration
func AXUIElementCopyAttributeValues(_ element: AXUIElement, _ attribute: CFString, _ index: CFIndex, _ maxValues: CFIndex, _ values: UnsafeMutablePointer<CFArray?>) -> AXErrorParameters
- element:
The AXUIElementRef representing the accessibility object.
- attribute:
The attribute name.
- index:
The index into the array.
- maxValues:
The maximum number of values you want (this may be more or less than the number of values associated with the attribute).
- values:
On return, the attribute values you requested. If
maxValuesis greater than the number of values associated with the attribute, thevaluesarray will contain values found betweenindexand the end of the attribute's array, inclusive.
Return Value
If unsuccessful, AXUIElementCopyAttributeValues may return one of the following error codes, among others:
kAXErrorIllegalArgumentThe attribute's value is not array, the
indexormaxValuesarguments are outside the array's range, or one of the other arguments is an illegal value.kAXErrorNoValueThe specified attribute does not have a value.
kAXErrorInvalidUIElementThe AXUIElementRef is invalid.
kAXErrorCannotCompleteThe function cannot complete because messaging has failed in some way.
kAXErrorNotImplementedThe process does not fully support the accessibility API.
Discussion
This function is useful for dealing with large arrays, for example, a table view with a large number of children.
See Also
Miscellaneous
AXIsProcessTrusted()AXIsProcessTrustedWithOptions(_:)AXUIElementCopyActionDescription(_:_:_:)AXUIElementCopyActionNames(_:_:)AXUIElementCopyAttributeNames(_:_:)AXUIElementCopyAttributeValue(_:_:_:)AXUIElementCopyElementAtPosition(_:_:_:_:)AXUIElementCopyMultipleAttributeValues(_:_:_:_:)AXUIElementCopyParameterizedAttributeNames(_:_:)AXUIElementCopyParameterizedAttributeValue(_:_:_:_:)AXUIElementCreateApplication(_:)AXUIElementCreateSystemWide()AXUIElementGetAttributeValueCount(_:_:_:)AXUIElementGetPid(_:_:)AXUIElementGetTypeID()AXUIElementIsAttributeSettable(_:_:_:)AXUIElementPerformAction(_:_:)AXUIElementSetAttributeValue(_:_:_:)AXUIElementSetMessagingTimeout(_:_:)