MoveToText

class MoveToText(text: str, min_similarity: float = 0.9, offset: Point | RelativelyPoint = <appwindows.appwindows.geometry.Point object>, text_getter: GetText | None = None)[source]

Bases: OCRInstruction

Move the mouse cursor to the best matching text block.

property id: int

Return the unique OCR instruction identifier.

Returns:

OCR instruction identifier.

Return type:

int

find_text(texts: list[TextData]) tuple[TextData, float][source]
perform(ui: BaseUi, text_reader: BaseTextReader, *args, **kwargs)[source]

Execute the instruction with a text reader.

Parameters:
  • ui (BaseUi) – UI instance used during execution.

  • text_reader (BaseTextReader) – Text reader used to detect text.

  • args – Additional positional arguments for the execution flow.

  • kwargs – Additional keyword arguments for the execution flow.

Returns:

Updated UI state when the implementation returns it.

Return type:

BaseUi

property text: str