OCR Screenshot
OCR Screenshot
Section titled “OCR Screenshot”Type: ocr-screenshot · Package: OCR Activities v1.2.5 · Output: string
Captures the whole screen and recognizes all visible text. Useful to dump the textual content of a full screen, or as a step before searching for something in it.
How it works
Section titled “How it works”Takes a capture of the given screen (the primary one by default) and runs it through OCR. It requires an interactive desktop session: it recognizes what is visible at that moment.
screenis the monitor index, starting at0. An out-of-range index is adjusted to the nearest valid one (a negative number uses screen0; one larger than the number of monitors uses the last).- It has no preprocessing; a full screen produces a lot of text and takes longer than a specific area.
Required parameters
Section titled “Required parameters”None.
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
screen | int | 0 | Screen index (0-based). 0 is the primary screen. |
language | string | "eng" | Text language: Tesseract code (eng, spa, eng+spa) or regional tag (es-CO, en-US). See language. |
Output
Section titled “Output”Returns a string with all the text recognized on the screen.
Example
Section titled “Example”OCR Screenshot language = "spa" → output: screenTextIf condition = contains(screenText, "Sesión expirada") └─ then: ... sign in again ...Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
Tesseract language '…' not found at '…'. Available: [eng, spa]. | The language code is not installed. |
| Screen capture error | There is no interactive desktop (locked session or no user signed in). |
Related activities
Section titled “Related activities”- OCR Recognize Screen Region — read only one area.
- OCR Find Text — locate a text on screen.