Automate

Automate

Make your phone or tablet smarter with automation

Get it on Google Play

Inspect text edit

An action block that awaits changes in a text field.

The fiber will pause until a edit is made in a text field, a change in its text selection, its caret/cursor moved, or a text field had gained focus.

The selected Input type will also match its “sub-types”, e.g. Text will inspect text fields accepting any kind of text, but Multirow text only those accepting multiple rows, or Number for those accepting any number, but Signed number only signed numbers.

The text selection start may be higher that end when the selection is made from right to left, when equal then it’s simply the position of the caret/cursor.

Use the Interact block with action Set text to change the text in the text field, and action Set selection to modify the selection or move the caret. Using either action will cause this block to proceed, ensure the flow handles such cases to avoid it looping continuously.

Note! This feature requires Android 4.4+.

Input arguments

  • Input type — mode of input, default is a Text.
  • Package — package name of the app displaying the text field, default is any.

Output variables

  • Text after change — variable to assign the text in the text field after the change was made.
  • Text before change — variable to assign the text in the text field before the change was made.
  • Selection start — variable to assign the character index where text selection starts.
  • Selection end — variable to assign the character index where text selection ends, also the position of the caret/cursor.
  • Maximum text length — variable to assign the maximum length of text the field accepts, or null if unknown. (Android 5+)
  • Input type — variable to assign the mode of input of the text field.
  • Package — variable to assign the package name of the app displaying the text field.
Note! This documentation is also accessible within the app from Help & feedback menu.