Skip to main content

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​

InputTypeRequiredDefaultWhat it is
XNumberNoRegion left (whole screen when empty).
YNumberNoRegion top.
WidthNumberNoRegion width.
HeightNumberNoRegion height.
LanguageStringNoengTesseract language(s), e.g. eng, deu or eng+fra.
Page modeNumberNo6Page layout mode: 3 automatic, 6 single block, 7 single line, 11 sparse text.
After textStringNoKeep only the text after the first occurrence of this marker, e.g. Invoice number:.
Before textStringNoKeep only the text before this marker (searched after the after_text marker).
TrimBooleanNotrueRemove spaces and line breaks at the start and end of the result.
ScaleNumberNo2Enlarge the image by this factor (1 to 5) before reading; 2 or 3 helps with small text.
Image modeStringNononePrepare the image: none, gray, or black_white (a simple threshold that often helps with coloured backgrounds).
Wait (milliseconds)NumberNo0Wait this many milliseconds before capturing, e.g. 1000 for a slow remote session.
WindowStringNoRead 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​

OutputTypeWhat it is
textStringRecognised text.