Skip to main content

Click Text

Uses OCR (Optical Character Recognition) to locate specific text on the screen and performs a click action at its position.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.

Inputs

  • Text - The text to search for on the screen.

Options

  • Confidence - Confidence level for image recognition when using reference images (default: 0.95).
  • Mouse Button - Which mouse button to click. Options: Left Button, Center Button, Right Button (default: Left Button).
  • Click Type - Type of click to perform. Options: Single Click, Double Click (default: Single Click).
  • Key Modifier - Keyboard modifier to hold while clicking. Options: None, Alt, Ctrl, Shift, Win, CMD (default: None).
  • Index - Index of the text occurrence to click if multiple instances are found (default: 0).

Outputs

This node does not have outputs.

How It Works

The Click Text node finds specific text on the screen using OCR and clicks it. When executed, the node:

  1. Takes a screenshot of the current screen or uses a reference image if provided
  2. Uses OCR (pytesseract) to extract text from the image
  3. Searches for the specified text within the recognized text
  4. Moves the mouse cursor to the center of the found text
  5. Performs the specified click action with any modifier keys
  6. Releases any modifier keys after clicking

Requirements

  • Valid text to search for
  • Confidence value between 0 and 1 (when using reference images)
  • Valid mouse button and click type selections
  • Valid index value (non-negative integer)
  • Tesseract OCR engine installed and configured

Error Handling

The node will return specific errors in the following cases:

  • Empty text - "Text can not be empty"
  • Could not read image - "Could not read image"
  • Missing confidence - "Confidence can not be empty"
  • Invalid confidence format - "Confidence is not valid"
  • Confidence out of range - "Confidence must be between 0 and 1"
  • Text not found - "Could not find specified text"
  • Invalid index format - "Index is not valid"
  • Negative index - "Index must be greater than or equal to 0"
  • Unknown click type - "Unknown Click Type"
  • Image not found - "Could not find image. Decreasing confidence may help"

Usage Notes

  • This node combines OCR text recognition with mouse automation
  • Useful for automating interactions with text-based UI elements
  • Can work with the entire screen or specific regions defined by reference images
  • When multiple instances of the same text are found, the Index option determines which one to click
  • The mouse is positioned at the center of the text bounding box
  • Modifier keys can be used for special click actions (e.g., Ctrl+Click)
  • Works best with clear, high-contrast text
  • May require adjusting confidence levels based on text quality and font
  • The deltaX and deltaY properties can be used to adjust the click position relative to the found text