Browse the docs

Read all the text of an app's document

Reads the whole text of a document, note, field or terminal, what is on screen of it, or what is selected, with no limit on length.

Read the text of locator into into

Details #

Reads text from the element locator names. With no locator it uses the biggest text area or web area in the front window (then a text field). range says how much: all (the default) is the whole text, with none of the 200-character cut Read field value has; visible is what is on screen now, in a long document or a terminal; selected is the selection. The result is {text, chars, lines} and into receives the text.

A huge document is read in chunks the way VoiceOver does, up to 5 MB, and the result says truncated past that. Terminal, iTerm and Ghostty give their screen as the text, so reading a terminal gets the scrollback exactly, with no OCR.

A password field is refused: the step fails with "That's a password field."

With range: selected and nothing selected the text is empty, not an error.

Parameters #

ParameterTypeRequiredValuesWhat it does
apptextThe app to look in, by bundle id.
fuzzyyes / no, into.
intotext
locatorlocatorThe text area or field. Optional.
rangeone ofall visible selectedall, visible or selected.
sampleany value

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

The note in front, to the clipboard
Do
  1. Read all the text of the front window into note
  2. Copy “{{ note }}” to the clipboard
Open in Switchboard to try it

Gotchas #

See also #

Read field value, Read the rows of an app's list, Read text on screen