Method ocr.waitNot
Overload
Performs OCR (text recognition) and waits until the specified text does not exist in results.
public static bool waitNot(Seconds timeout, IFArea area, string text, OcrFlags flags = 0, double scale = 0, IOcrEngine engine = null, int skip = 0)
Parameters
timeout (Seconds)
Timeout, seconds. Can be 0 (infinite), >0 (exception) or <0 (no exception). More info: Wait timeout. |
area (IFArea)
On-screen area or image:
|
text (string)
Text to find in ocr.TextForFind. Can have prefix:
|
flags (OcrFlags) |
scale (double)
Scale factor (how much to resize the image before performing OCR). Value 2 or 3 may improve results of OCR engine OcrWin10 or OcrTesseract. If 0 (default), depends on engine's IOcrEngine.DpiScale and area's DPI. |
engine (IOcrEngine)
OCR engine. Default: ocr.engine (OcrWin10 if not specified). |
skip (int)
Skip this count of found text instances. |
Returns
bool
Returns |
Exceptions
TimeoutException
timeout time has expired (if > 0). |
AuWndException
Invalid window handle (the area argument), or the window closed while waiting. |
ArgumentException
An argument is/contains a |
AuException
Something failed. |
Remarks
The function captures image from screen or window (unless area is Bitmap) and passes it to the OCR engine (calls IOcrEngine.Recognize). Then finds the specified text in results. If found, creates and returns an ocr object that contains results.
The speed depends on engine, area size and amount of text.