# Recognize Text from Screen

This block allows you to specify a screen area (application window, panel, or another element within the window) during robot development, and then during the execution of the script, the robot recognizes all text from the specified screen area using OCR technology and stores the recognition result in the specified text variable. You can choose from several available offline and online OCR modules.

<table data-header-hidden><thead><tr><th width="243" valign="top"></th><th width="316" 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">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">Text Language</td><td valign="top">Select the language of the text.</td></tr><tr><td valign="top">Result</td><td valign="top">[Text] The recognized text will be placed in the variable specified here.</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 specifies the particular 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 moment 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">Splitting Method</td><td valign="top"><p>[Text] The recognized text can be automatically split into segments, separated by commas. Splitting method:</p><ul><li>0 - Use the specified block separator,</li><li>1 - Automatic splitting (only for Yandex),</li><li>2 - Split by empty spaces longer than the specified number of characters.</li></ul></td></tr><tr><td valign="top">Block Separator</td><td valign="top"><p>[Number] The hexadecimal code of the character that will be considered a block separator.</p><p>For example, a space has the code 20, a tab character has the code 9. Used when selecting splitting method 0.</p></td></tr><tr><td valign="top">Number of Characters</td><td valign="top">[Number] The length of the empty space in the recognized text, measured in the number of characters, which is used when selecting the text splitting method 2.</td></tr><tr><td valign="top">Zoom</td><td valign="top"><p>[Number] A value indicating how many times to zoom 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">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - 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" - default;</li><li>"Release" - output is disabled;</li><li>"Debug" - outputs basic information;</li><li>"Detailed" - outputs detailed information.</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's work.</td></tr></tbody></table>
