OCR Scraping

I have to scrape a portion of an image to extract a specified portion of text.I don’t want to scrape whole image text.So I need to draw a rectangular box to represent the area on windows application(Free OCR) screen. Can anyone please let me know how to draw the rectangular box on the screen in UIPath. I have tried with Recording but didn’t get desired output.I have attched the screenshot below.Please help with this issue.

Hi @Teja1,

First of all you need to give file with image. The best way orginal one.
The whole proces should look like:

  1. Using OCR scrap all the text. Tips: If image is bigger (thats mean on whol screen) then results of sctaping are better.
  2. Text put to variable type string.
  3. Cut out needed part using assign window… left side variable type string right side your text in variable with methode split. You have to learn method split its using quite often.
    Send orginal image/file then ill can help you more.

Question: if the text every time will be the same or what can be changed ?


Thanks for your solution @fudi5. Yes I have tried scraping the whole image and saving the output to a string variable.But my invoice has a complex layout and some hand written text.So if i scrap whole image as a text. I am not getting the accurate data.I know that I can do string split operations.But I don’t want to do it that way due to accuracy constraints.Please let me know whether it is possible with Microsoft VB.net DragAction or any other methods.If it is possible please share the code for the same.

Hi @Teja1,

When you try to do scraping at that time during selection just type F3 special key and try to capture
the region you want to ,i guess it will work