Skip to main content

Click text on screen

Find a word or phrase (or its n-th appearance) on the screen with OCR and click it with the chosen button, optionally offset from its centre (OCR.TEXT_NOT_FOUND when absent).

Command in the OCR toolkit · id ooa.ocr/click_text · 7 inputs (1 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
TextStringYesWord or phrase to click.
Double-clickBooleanNofalseDouble-click.
LanguageStringNoengTesseract language(s), e.g. eng, deu or eng+fra.
OccurrenceNumberNo1Which appearance to click, counting in reading order from 1.
ButtonStringNoleftMouse button to click with.
Offset xNumberNo0Pixels to the right (negative: left) of the text's centre to click, e.g. to hit a field next to a label.
Offset yNumberNo0Pixels below (negative: above) the text's centre to click.

Outputs​

OutputTypeWhat it is
xNumberClicked x.
yNumberClicked y.