Synchronization on OCR Text

In some Windows applications or in some web sites (Flash ones for example), WinTask cannot recognize the text displayed. So the Synchronization on Text cannot be used to wait until a text is displayed. In that case, use Synchronization on OCR Text (not available in WinTask Lite) : WinTask captures as a bitmap the text seen on the screen/screen portion and tranforms the image in a text using an OCR engine (Optical Recognition Character engine).

IMPORTANT: the OCR engine is not able to convert the text within an image in an accurate text for any characters, but is accurate enough to do perfect synchronization.

 

The OCR Text Synchronization dialog can be accessed with the Insert/Synchronization/On OCR Text menu or in Recording mode by clicking in the WinTask toolbar the Synchronization on OCR Text icon.

Select the OCR engine that the synchronization will use. The WinTask OCR engine is the one by default. If Microsoft Office 2003 or 2007 is installed on the PC, the MODI (Microsoft Office Document Imaging) OCR engine can be used too and gives usually better results. If the listbox Select the OCR engine does not show MODI, click the How to install MODI link.

Click Capture button. The wizard screen is minimized and the mouse pointer becomes a circle. With the mouse draw a rectangle around the text you want to wait for. When the capture is done, the wizard screen comes to focus and the Window field displays the name of the captured window.

Uncheck the Only in this area checkbox if you want to wait for the text anywhere in the whole window. Keep in mind that the OCR process will take much longer if it applies to a whole window. Note that with WinTask OCR engine, the text recognition is less accurate for a whole window - with MODI OCR engine, you can take the whole window but the OCR process will be longer. Applying the OCR transformation to the whole window will make the synchronization independant of mouse coordinates (as defined in the Capture).

The captured bitmap transformed by the OCR engine is now in the "Text" field. If the results do not give a usable text for the synchronization, Capture a new area.

From the text as transformed by the OCR engine (field "Text"), copy a small correctly transformed part of the text and paste it in the field "Copy from...". Click Check button to check that at replay, the text that you have pasted in that field will be recognized correctly by the OCR engine. This Check process can take a couple of seconds if the captured text is big or difficult to process.

The text synchronization reports a failure at execution if the specified text is not recognized by the OCR engine within a default timeout of 120 seconds. Check the checkbox Use this timeframe and specify another value if you want to change the default timeout. IMPORTANT : the OCR transformation takes around 2 secs for a simple captured text and can take up to 10 secs for a complex one, so DO NOT specify a too short timeframe.

On Pause failure, a default message is displayed, click Options button if you want to change the default message. If you uncheck On Pause failure end the script, when the pause fails, execution of the script goes on.

Language field specifies the language used by the OCR engine. This option is valid only for the MODI OCR engine. Leave Default Language unless the window content is not using your Windows native language.

 

Click Paste into the script (or Insert and Resume) to paste the synchronization statements into the script.