# Recognize Text from Element

This block allows you to specify a screen area (application window, panel, or another element within the window) during the robot development, and then during the script execution, 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="247" valign="top"></th><th width="325" 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">Text Language</td><td valign="top">Selection of the text language.</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 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">Selection of the OCR module used for recognizing the image into text.</td></tr><tr><td valign="top">Segmentation Method</td><td valign="top"><p>[Text] The recognized text can be automatically segmented into parts, separated by commas. Segmentation method:</p><ul><li>0 - Use the specified block separator,</li><li>1 - Automatic segmentation (only for Yandex),</li><li>2 - Segment 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 segmentation 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 segmentation method into blocks 2.</td></tr><tr><td valign="top">Zoom</td><td valign="top"><p>[Number] A value indicating how much 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">Timeout</td><td valign="top">[Number] The maximum wait time for the element to appear in seconds.</td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Selection of 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 of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Selection of 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 main information;</li><li>"Detailed" - outputs detailed information.</li></ul><p>If "Default" is selected, the value of 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>
