OCRExtractRelative is failing

Good morning forum,

I’m using UI vision Personal Edition in Desktop mode.
I’m trying to use OCRExtractRelative on a simple case like the following.


My green box is the string PROFIT, and I would like to extract the value in the adjacent pink box.
After 10 seconds I get the message
[error] Line 7: Image ‘rrvyni_dpi_144.png’ (conf. = 0.8) not found

what I find a bit strange is that if I use OCRSearch to find my green box, then I get 1 meaning that OCR engine is able to find 1 occurrence of the pattern: so, I would say OCR is working fine.
Also, if I use xclixk on my green box then I get my pointer well positioned in the middle of the green box.
So I cannot really understand the error message triggered by OCRExtractRelative

I have tried different OCR engines with the same results.
Any help on what’s going on in my case?


Can you post the _lastscreenshot.png image? This shows the result of
OCRExtractRelative (the image that then gets OCRed).

Hello forum,

any help on this ?



I have found the OCRExtractRelative command to be a little bit picky when it comes to smaller image sizes. I would try expanding the pink box to capture the all the way to the right including the %. You can then use the executeScript_Sandbox command to remove the % from the returned string.