OCR Error

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
elenareinoso
Newbie
Posts: 2
Joined: Fri Jul 21, 2017 9:11 am

OCR Error

Post by elenareinoso » Mon Oct 09, 2017 9:58 am

im trying execute my script in another computer.
My script search with OCR some text in an area

Code: Select all

 OCRArea>73,98,220,123,strText
But my .exe give me this error:
"Exception EOcrError in module....
Cannot initialize Tesseract library"

Thanks!

elenareinoso
Newbie
Posts: 2
Joined: Fri Jul 21, 2017 9:11 am

Re: OCR Error

Post by elenareinoso » Mon Oct 09, 2017 10:15 am

My Error!Sorry

OCRArea>left,top,right,bottom,result

Performs Optical Character Recognition against the specified screen region to retrieve text. Returns the recognised text in the result variable.

This function uses the Tesseract OCR engine via the included ocr.dll runtime file. Language files are stored by default in the "tessdata" folder in the main Macro Scheduler program folder. If compiling a macro that uses this function with Macro Scheduler Pro and selecting the option to copy runtime files the compiler will copy the ocr.dll and tessdata folder to the target folder. If you wish to point this function to a different folder that contains a tessdata folder, set the path with the OCR_LANGDIR variable.

To improve accuracy the image captured from the screen is scaled by a factor of 2. To set a different scale factor set OCR_SCALEFACTOR.

Note that OCR is processor intensive and therefore can take some time. The larger the screen region the longer it will take so it is best to try and keep the screen area small.

See also OCRImage, OCRScreen, OCRWindow

Example:

OCRArea>10,20,600,500,strResult
MessageModal>strResult

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts