hs._asm.axuielement
.cp.ui.axutils.cache(source, key, finderFn[, verifyFn]) -> axuielement
source[key]
is a valid axuielement. If notcp.ui.axutils.childAtIndex(element, index, compareFn[, matcherFn]) -> axuielement
index
when sorted using the compareFn
.true
if the child should be processed.nil
if the index is larger than the number of children.cp.ui.axutils.childFromBottom(element, index) -> axuielement
index
when sorted bottom-to-top.true
if the child should be processed.nil
if the index is larger than the number of children.cp.ui.axutils.childFromLeft(element, index[, matcherFn]) -> axuielement
index
when sorted left-to-right.true
if the child should be processed.nil
if the index is larger than the number of children.cp.ui.axutils.childFromRight(element, index[, matcherFn]) -> axuielement
index
when sorted right-to-left.true
if the child should be processed.nil
if the index is larger than the number of children.cp.ui.axutils.childFromTop(element, index[, matcherFn]) -> axuielement
index
when sorted top-to-bottom.true
if the child should be processed.nil
if the index is larger than the number of children.cp.ui.axutils.childInColumn(element, role, startIndex, childIndex) -> table | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Finds the children for an element, then checks to see if they match the supplied | | Parameters |axuielement
if it matches, otherwise nil
.cp.ui.axutils.childIndex(element) -> number or nil
nil
is returned.axuielement
to find the index of.1
or higher) of the element
, or nil
if it was not found.cp.ui.axutils.childMatching(element, matcherFn[, index]) -> axuielement
true
.1
.cp.ui.axutils.children(element[, compareFn]) -> table
hs._asm.axuielement
, it willcp.ui.axutils.childrenAbove(element, bottomElement) -> table of axuielement or nil
axuielement
children from the element
which are above the specified bottomElement
.axuielement
to find the children of.axuielement
that the other children must be above.axuielements
that are above, or nil
if the element is not available.cp.ui.axutils.childrenBelow(element, topElement) -> table of axuielement or nil
axuielement
children from the element
which are below the specified topElement
.axuielement
to find the children of.axuielement
that the other children must be below.axuielements
that are below, or nil
if the element is not available.cp.ui.axutils.childrenInColumn(element, role, startIndex) -> table | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Finds the children for an element, then checks to see if they match the supplied | | Parameters |axuielement
objects, otherwise nil
.cp.ui.axutils.childrenInLine(element) -> table | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Gets a table of children that are all in the same family and line as the | | Parameters |axuielement
objects, otherwise nil
.cp.ui.axutils.childrenInNextLine(element) -> table | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Gets a table of children that are in the next line in relation to the supplied | | Parameters |axuielement
objects, otherwise nil
.cp.ui.axutils.childrenMatching(element, matcherFn) -> { axuielement }
nil
if none was foundcp.ui.axutils.childrenWith(element, name, value) -> axuielement
nil
if none was foundcp.ui.axutils.childrenWithRole(element, value) -> axuielement
AXRole
attribute with the matching value.nil
if none was foundcp.ui.axutils.childWith(element, name, value) -> axuielement
cp.ui.axutils.childWithDescription(element, value) -> axuielement
AXDescription
with the specified value.nil
if none was foundcp.ui.axutils.childWithID(element, value) -> axuielement
AXIdentifier
with the specified value.nil
if none was foundcp.ui.axutils.childWithRole(element, value) -> axuielement
AXRole
with the specified value.nil
if none was foundcp.ui.axutils.childWithTitle(element, value) -> axuielement
AXTitle
with the specified value.nil
if none was foundcp.ui.axutils.compareBottomToTop(a, b) -> boolean
true
if element a
is below element b
. May be used with table.sort
.true
if a
is below b
.cp.ui.axutils.compareLeftToRight(a, b) -> boolean
true
if element a
is left of element b
. May be used with table.sort
.true
if a
is left of b
.cp.ui.axutils.compareRightToLeft(a, b) -> boolean
true
if element a
is right of element b
. May be used with table.sort
.true
if a
is right of b
.cp.ui.axutils.compareTopToBottom(a, b) -> boolean
true
if element a
is above element b
. May be used with table.sort
.true
if a
is above b
.cp.ui.axutils.hasAttributeValue(element, name, value) -> boolean
axuielement
true
if the element
has the supplied attribute value, otherwise false
.cp.ui.axutils.hasChild(element, matcherFn) -> boolean
matcherFn
.axuielement
to check.function
that accepts an axuielement
and returns a boolean
true
if any child matches, otherwise false
.cp.ui.axutils.isValid(element) -> boolean
true
if the element is valid.cp.ui.axutils.prop(uiFinder, attributeName[, settable]) -> cp.prop
cp.prop
which will find the hs._asm.axuielement
via the uiFinder
andcp.prop
or function
which will retrieve the current hs._asm.axuielement
.AX
atrribute name the property links to.false
. If true
, the property will also be settable.cp.prop
for the attribute.uiFinder
is a cp.prop
, it will be monitored for changes, making the resulting prop
"live".cp.ui.axutils.match.role(roleName) -> function
match
function that will return true if the axuielement
has the specified AXRole
.function(element) -> boolean
that checks the AXRole
is roleName
cp.ui.axutils.snapshot(element[, filename]) -> hs.image
axuielement
and returns it.axuielement
to snap.hs.image
file, or nil
if the element could not be snapped.cp.ui.axutils.valueOf(element, name[, default]) -> anything
AX
attribute value, or the default
if it is empty.axuielement
to retrieve the attribute value for.nil
.default
if none is found.cp.ui.axutils.withAttributeValue(element, name, value) -> hs._asm.axuielement | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Checks if the element has an attribute value with the specified name
and value
. | | Parameters |axuielement
if it matches, otherwise nil
.cp.ui.axutils.withRole(element, role) -> hs._asm.axuielement | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Checks if the element has an "AXRole" attribute with the specified role
. | | Parameters |axuielement
if it matches, otherwise nil
.cp.ui.axutils.withTitle(element, title) -> hs._asm.axuielement | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Checks if the element has an "AXTitle" attribute with the specified title
. | | Parameters |axuielement
if it matches, otherwise nil
.cp.ui.axutils.withValue(element, value) -> hs._asm.axuielement | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Checks if the element has an "AXValue" attribute with the specified value
. | | Parameters |axuielement
if it matches, otherwise nil
.