This function performs optical character recognition (OCR) on a selected screen region and compares the result with a provided string. When the verification condition is not met, an error is raised. You can specify the severity of the error. Screen regions can be specified absolutely or relative to a window (by specifying a window handle).
CitrixVerifyTextFuzzy performs OCR more exactly than CitrixVerifyText but requires more resources.
CitrixAPI.bdh
CitrixVerifyTextFuzzy( in sVerify : string, in nWindow : number, in nX : number, in nY : number, in nWidth : number, in nHeight : number, in sLanguage : string, in nOptions : number optional, in nSeverity : number optional := SEVERITY_ERROR ): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
sVerify | String to compare with the parsed data. |
nWindow | Window handle returned by a call to CitrixWaitForWindowCreation. Use DESKTOP to specify a region relative to the desktop. |
nX | X coordinate of the left margin of the screen region. |
nY | Y coordinate of the top margin of the screen region. |
nWidth | Width of the region. |
nHeight | Height of the region |
sLanguage | The language of the text to be verified. Possible language codes are chi_sim, dan, deu, eng, fin, fra, ita, jpn, nld, nor, pol, spa and swe. |
nOptions |
Specify any combination of the following flags (optional):
|
nSeverity |
Optional: Severity of the error that is raised if the verification fails. Can be one of the following values:
|
transaction TMain begin CitrixInit(640, 480); // do not change the resolution CitrixConnect("lab1", "user", "password", "domain", COLOR_16bit); CitrixWaitForLogon(); CitrixVerifyTextFuzzy("Joe", DESKTOP, 73, 109, 74, 23, CITRIX_FLAG_IgnoreWhitespace, SEVERITY_WARNING, "eng"); CitrixDisconnect(); end TMain;