The Button
type extends Element and includes all its
methods, fields and other properties.
- Functions - API calls offered directly by the extension
- matches
- Constructors - API calls which return an object, typically one that offers API methods
- Button
- Fields - Variables which can only be accessed from an object returned by a constructor
- title
- Methods - API calls which can only be made on an object returned by a constructor
- doPress
- press
Signature |
cp.ui.Button.matches(element) -> boolean |
Type |
Function |
Description |
Checks if the element is a Button , returning true if so. |
Parameters |
- element - The
hs._asm.axuielement to check.
|
Returns |
true if the element is a Button , or false if not.
|
Signature |
cp.ui.Button(parent, uiFinder) -> cp.ui.Button |
Type |
Constructor |
Description |
Creates a new Button instance. |
Parameters |
- parent - The parent object. Should have a
UI and isShowing field. - uiFinder - A function which will return the
hs._asm.axuielement the button belongs to, or nil if not available.
|
Returns |
The new Button instance. |
Signature |
cp.ui.Button.title <cp.prop: string; read-only> |
Type |
Field |
Description |
The button title, if available. |
Signature |
cp.ui.Button:doPress() -> cp.rx.go.Statement |
Type |
Method |
Description |
Returns a Statement that will press the button when executed, if available at the time. |
Parameters |
|
Returns |
- The
Statement which will press the button when executed.
|
Signature |
cp.ui.Button:press() -> self, boolean |
Type |
Method |
Description |
Performs a button press action, if the button is available. |
Parameters |
|
Returns |
- The
Button instance. true if the button was actually pressed successfully.
|