# Click on Recognized Text

This block allows you to specify a screen area (application window, panel, or another element within the window), one or more words, and record the click coordinates relative to the position of these words within the screen area during robot development. Then, during the script execution, the robot recognizes all the text from the specified screen area using OCR technology, finds a similar section of the screen with the specified text, and then performs a click at the point with the previously saved coordinates relative to the top left corner of the found text.

You can choose one of several available offline and online OCR modules. This block is especially useful for clicking on controls in applications and web pages where stable selectors for the required element cannot be found, or if the application window appears to the operating system as a single image (for example, when working with an application through remote access tools).

<table data-header-hidden><thead><tr><th width="245" valign="top"></th><th width="315" valign="top"></th></tr></thead><tbody><tr><td valign="top">Selector</td><td valign="top">[Selector] The identifier of the window or user interface element within which text recognition will occur.</td></tr><tr><td valign="top">Action</td><td valign="top"><p>Select an action:</p><ul><li>left click,</li><li>double click,</li><li>right click,</li><li>hover.</li></ul></td></tr><tr><td valign="top">X Coordinate</td><td valign="top">[Number] The horizontal coordinate of the top left corner of the selected window or control area where the image will be captured and recognized.</td></tr><tr><td valign="top">Y Coordinate</td><td valign="top">[Number] The vertical coordinate of the top left corner of the selected window or control area where the image will be captured and recognized.</td></tr><tr><td valign="top">Width</td><td valign="top">[Number] The width of the image to be captured and recognized in pixels.</td></tr><tr><td valign="top">Height</td><td valign="top">[Number] The height of the image to be captured and recognized in pixels.</td></tr><tr><td valign="top">Click X Coordinate</td><td valign="top">[Number] The horizontal offset of the click coordinate relative to the top left corner of the found text block on the screen.</td></tr><tr><td valign="top">Click Y Coordinate</td><td valign="top">[Number] The vertical offset of the click coordinate relative to the top left corner of the found text block on the element.</td></tr><tr><td valign="top">Text Language</td><td valign="top">Select the language of the text.</td></tr><tr><td valign="top">Text Search</td><td valign="top">[Text] Search for text in the recognized image. If specified, the mouse click will be performed relative to the top left corner of the found text block; otherwise, it will be relative to the top left corner of the specified screen area coordinates.</td></tr><tr><td valign="top">Match Percentage</td><td valign="top"><p>[Number] The percentage of match for the searched text, from 0 to 100. Decrease this number to find the searched text even in case of inaccuracies in text recognition.</p><p>A value that is too low will lead to matches with unwanted words.</p></td></tr><tr><td valign="top">Match Index</td><td valign="top">[Number] If the searched text is found in the specified screen area multiple times, you can specify the ordinal number of the match to be used for the click. Numbering starts from 1.</td></tr><tr><td valign="top">Process ID</td><td valign="top"><p>[Link] A variable that stores the process identifier. Indicates which application to work with.</p><p>If the specified application is minimized or its window is covered by other windows, it will be brought to the foreground. When working with browsers, the process ID additionally indicates the specific browser tab that the block should work with.</p><p>If the property is left empty, or if the process ID variable was not previously assigned at the time of launching the application or opening the browser, the application and browser tab will be determined from the content of the corresponding selector line.</p><p>The process ID can be obtained, for example, using the Launch Application or Get Process blocks.</p></td></tr><tr><td valign="top">Module</td><td valign="top">Select the OCR module used for recognizing the image into text.</td></tr><tr><td valign="top">Zoom</td><td valign="top"><p>[Number] A value indicating how many times to zoom in on the image before recognition.</p><p>Depending on the engine used, zooming the image by 2 or 3 times helps improve recognition quality.</p></td></tr><tr><td valign="top">Simulate Movement</td><td valign="top">When enabled, it will simulate the movement of the mouse cursor from the current position to the calculated point by the block.</td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - by default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that the blocks will output during operation. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - main information output;</li><li>"Detailed" - detailed information output.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block.</td></tr></tbody></table>
