docs » cp.ui.TextField


Text Field Module.

API Overview

  • Fields - Variables which can only be accessed from an object returned by a constructor
  • Methods - API calls which can only be made on an object returned by a constructor

API Documentation

Fields

value

Signature cp.ui.TextField.value <cp.prop: anything>
Type Field
Description The current value of the text field.

Methods

new

Signature cp.ui.TextField.new(parent, finderFn[, convertFn]) -> TextField
Type Method
Description Creates a new TextField. They have a parent and a finder function.
Parameters
  • * parent - The parent object.
  • * finderFn - The function will return the `axuielement` for the TextField.
  • * convertFn - (optional) If provided, will be passed the `string` value when returning.
Returns
  • * The new `TextField`.

snapshot

Signature `cp.ui.TextField:snapshot([path]) -> hs.image nil` </span>
Type Method
Description Takes a snapshot of the UI in its current state as a PNG and returns it.
Parameters
  • * path - (optional) The path to save the file. Should include the extension (should be `.png`).

results matching ""

    No results matching ""