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 #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
app | text | The app to look in, by bundle id. | ||
fuzzy | yes / no | , into. | ||
into | text | |||
locator | locator | The text area or field. Optional. | ||
range | one of | all visible selected | all, visible or selected. | |
sample | any value |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Read all the text of the front window into note
- Copy “{{ note }}” to the clipboard
Gotchas #
A dry run skips this step unless you mark it Safe in dry run.
A page in a browser may show little as text; Extract links, a table or the article reads the page itself.
See also #
Read field value, Read the rows of an app's list, Read text on screen