Optical Character Recognition (OCR) in WinTask
WinTask records/replays using the individual objects seen on the screen, either Windows objects or HTML objects. If an object under automation is not seen, mouse coordinates are used automatically.
Mouse coordinates are not reliable as soon as the automation script has to run on different PCs with different screen resolution. Plus the script is difficult to read and maintain. Instead of using mouse coordinates, bitmaps can be used to identify with a meaningful name the objects under automation. But still this method of image recognition is awkward and not reliable when the objects at replay are not at the same place.
That’s why we introduced in WinTask the use of OCR engines (Optical Character Recognition). One is included in WinTask, and one uses the OCR engine provided by Microsoft (MODI for Microsoft Office Document Imaging). This last one gives astonishing results and allows WinTask to click properly on non-HTML objects/non pure Windows objects, just using the text of the object. And WinTask OCR functions allow you to look for the object anywhere in a window, so the object can be found even if it is not at the same place at replay.
With WinTask OCR functions, you get a readable automation script and a reliable replay.
Plus WinTask includes OCR Capture functions: retrieve directly the content of a form seen as an image, the content of an applet, etc.
- CaptureOCR$, captures what is seen in the specified window, OCRizes the content and returns the text as analysed by the OCR engine
- CaptureAreaOCR$, captures what is seen in the specified area of the specified window, OCRizes the content and returns the text as analysed by the OCR engine
- ClickOnTextOCR, clicks on the specified text as analysed by the OCR engine
- Synchronization on Text OCR, waits until the specified text as analysed by the OCR engine is displayed within the specified window, or within a part of the window
- UseOCREngine, specifies which OCR engine will be used by subsequent OCR function calls