Read text from screen
Capture the screen (or a region) and extract its text, optionally keeping only the text between two markers; for Citrix and applications without accessible controls.
Command in the OCR toolkit · id ooa.ocr/read_screen · 13 inputs, 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| X | Number | No | Region left (whole screen when empty). | |
| Y | Number | No | Region top. | |
| Width | Number | No | Region width. | |
| Height | Number | No | Region height. | |
| Language | String | No | eng | Tesseract language(s), e.g. eng, deu or eng+fra. |
| Page mode | Number | No | 6 | Page layout mode: 3 automatic, 6 single block, 7 single line, 11 sparse text. |
| After text | String | No | Keep only the text after the first occurrence of this marker, e.g. Invoice number:. | |
| Before text | String | No | Keep only the text before this marker (searched after the after_text marker). | |
| Trim | Boolean | No | true | Remove spaces and line breaks at the start and end of the result. |
| Scale | Number | No | 2 | Enlarge the image by this factor (1 to 5) before reading; 2 or 3 helps with small text. |
| Image mode | String | No | none | Prepare the image: none, gray, or black_white (a simple threshold that often helps with coloured backgrounds). |
| Wait (milliseconds) | Number | No | 0 | Wait this many milliseconds before capturing, e.g. 1000 for a slow remote session. |
| Window | String | No | Read from this window (title text, a pattern with * or ?, or re:regex): it is brought to the front and x, y are measured from its top-left corner; the whole window when the area is empty. |
Outputs
| Output | Type | What it is |
|---|---|---|
| text | String | Recognised text. |