Table

Last updated 9 months ago

Represents an AXTable in the Apple Accessibility UX API.

API Overview

API Documentation

Functions

Signature

cp.ui.Table.cellTextValue(cell) -> boolean

Type

Function

Description

Returns the cell's text value.

Parameters

Returns

Signature

cp.ui.Table.cellTextValueIs(cell, value) -> boolean

Type

Function

Description

Checks if the cell's text value equals value.

Parameters

Returns

Signature

cp.ui.Table.discloseRow(row) -> boolean

Type

Function

Description

Discloses the row, if possible.

Parameters

Returns

findRow

Signature

cp.ui.Table.findRow(rows, names) -> axuielement

Type

Function

Description

Finds the row at the sub-level named in the names table and returns it.

Parameters

Returns

is

Signature

cp.ui.Table.is(thing) -> boolean

Type

Function

Description

Checks if the thing is a Table.

Parameters

Returns

matches

Signature

cp.ui.Table.matches(element)

Type

Function

Description

Checks if the element is a valid table.

Parameters

Returns

Signature

cp.ui.Table.matchesContent(element) -> boolean

Type

Function

Description

Checks if the element is a valid table content element.

Parameters

Returns

visitRow

Signature

cp.ui.Table.visitRow(rows, names) -> axuielement

Type

Function

Description

Selects the row at the sub-level named in the names table.

Parameters

Returns

Constructors

new

Signature

cp.ui.Table.new(parent, finder) -> self

Type

Constructor

Description

Creates a new Table.

Parameters

Returns

Methods

columnsUI

Signature

`cp.ui.Table:columnsUI() -> table of axuielements

nil` </span>

Type

Method

Description

Return a list of column headers, if present.

Parameters

Returns

Signature

cp.ui.Table:deselectAll(rowUI) -> boolean

Type

Method

Description

Deselects the specified rows. If rowsUI is nil, then all rows will be deselected.

Parameters

Signature

cp.ui.Table:deselectRow(rowUI) -> boolean

Type

Method

Description

Deselect a specific row.

Parameters

Signature

cp.ui.Table:deselectRowAt(index) -> boolean

Type

Method

Description

Deselects a row at a specific index.

Parameters

Signature

cp.ui.Table:findCellUI(rowNumber, columnId) ->hs._asm.axuielement`

nil` </span>

Type

Method

Description

Finds a specific Cell UI.

Parameters

Returns

Signature

`cp.ui.Table:findColumnIndex(id) -> number

nil` </span>

Type

Method

Description

Finds the Column Index based on an AXIdentifier ID.

Parameters

Returns

Signature

cp.ui.Table:loadLayout(layout) -> none

Type

Method

Description

Loads a Table layout.

Parameters

Returns

parent

Signature

cp.ui.Table:parent() -> value

Type

Method

Description

The table's parent, as provided in the constructor.

Parameters

Returns

rowsUI

Signature

`cp.ui.Table:rowsUI([filterFn]) -> table of axuielements

nil` </span>

Type

Method

Description

Returns the list of rows in the table. An optional filter function may be provided.

Parameters

Returns

Signature

cp.ui.Table:saveLayout() -> table

Type

Method

Description

Saves the current Table layout to a table.

Parameters

Returns

selectAll

Signature

cp.ui.Table:selectAll(rowUI) -> boolean

Type

Method

Description

Selects the specified rows. If rowsUI is nil, then all rows will be selected.

Parameters

Signature

`cp.ui.Table:selectedRowsUI() -> table of axuielements

nil` </span>

Type

Method

Description

Return a table of selected row UIs.

Parameters

Returns

selectRow

Signature

cp.ui.Table:selectRow(rowUI) -> boolean

Type

Method

Description

Select a specific row.

Parameters

Signature

cp.ui.Table:selectRowAt(index) -> boolean

Type

Method

Description

Select a row at a specific index.

Parameters

showRow

Signature

cp.ui.Table:showRow(rowUI) -> boolean

Type

Method

Description

Shows a specific row.

Parameters

showRowAt

Signature

cp.ui.Table:showRowAt(index) -> boolean

Type

Method

Description

Shows a row at a specific index.

Parameters

topRowsUI

Signature

`cp.ui.Table:topRowsUI(filterFn) -> table of axuielements

nil` </span>

Type

Method

Description

Returns a list of top-level rows in the table. An optional filter function may be provided.

Parameters

Returns

uncached

Signature

cp.ui.Table:uncached() -> Table

Type

Method

Description

Calling this will force the table to look up the axuielement on demand, rather than caching the result.

Parameters

viewFrame

Signature

cp.ui.Table:viewFrame() -> hs.geometry rect

Type

Method

Description

Returns the Table frame.

Parameters