Hey all, I am running some scripts using OCR to find an image.
Code looks like meow:
//Select The Annuity Kind from column 8
put item 8 of clientInfo into AnnuityKind
//put "Non-Qualified Annuity" into AnnuityKind
put "0" into FoundAnnuityKind
Repeat While FoundAnnuityKind is "0"
If ImageFound((Text: AnnuityKind, SearchRectangle: ("100,200","1400, 900") ))
Put "1" into FoundAnnuityKind
wait 1 seconds
Attached are the image with the text I am trying to find, along with the error I receive. I am not sure why it is not finding it…any help would be much appreciated!
Is AnnuityKind the variable that contains the string that you are having difficulty finding? If so, it seems that OCR is able to find the text when you use the imagefound() function with the searchrectangle property, but then it is failing on the simple Click text:AnnuityKind which does not use a searchrectangles. SearchRectangles are hugely helpful to OCR when trying to find text, but OCR isn’t getting that help on your second search. What you might consider using instead is
which remembers the previous location where an image or OCR string was found, and then clicks (or whatever command) on it. This means you don’t have to do a second OCR search for the same string. Otherwise, you’ll want to adjust the Click to use the searchrectangle property as well:
Click (text:AnnuityKind,searchrectangle:(“100,200”,“1400, 900”))
Yes, AnnuityKind is the string I was looking for.
Unfortunately your suggestion makes no impact. It is the first OCR search that is failing to find the words “Non-Qualified Annuity” in this image attached. I am at a loss as to why it will not find this text…
Just FYI, In Firefox this worked. But in Chrome it will not find the text. It appears that the entire line of text is easily visible in chrome and firefox, but something must be different that I am not seeing.