Find Text (Can I look for specific fonts?)

I’m trying to use the find text feature via the new OCR, we seem to have a Font that is Lucida Console that makes the “1” and the “7” different from all our other fonts.

This font puts a “line” at the bottom and a diagonal line coming off the top going down to the left. All my other fonts, don’t have the line at the bottom but same diagonal line coming off the top going down to the left.

Well, eggplant doesn’t like the one with the “line” at the bottom. I’ve tried “TextFont”, which seems to be only for TIG. I have the contrast on and the search rectangle over an area. What it does is it find’s it on the “4” or the “7”, which makes sense as about 50% of a 4 is a 1…without the bottom line.

Help? How do I get it to recognize the 1? Let’s say I make a repeat that goes 1 through 10, with the “text” value alternating 1-10. The outcome is “423456789”.

click (text: "1", searchRectangle:(537,316,831,740), Contrast:On, ContrastColor: "#810906")

Can I use TextStyle and will I have to set that via the preferences?


Could you post a screenshot? It looks like you tried to already but it came through as a grey rectangle.

Also, have you tried setting the ValidCharacters? It might not work in this situation since you will want all numbers to be valid, but you could try using this and see if it helps:



yes mam, I have tried valid characters, which I don’t think is valid here as a 4 and 7 would be in the valid characters and it would still find it as a 4 or a 7…

just as an example, I put “validCharacters” as just “1” and it found it as a “7”…

I’ve also tried the “special characters” via “edit”…cause it has the “1” I am talking about, it puts the character along with the font into the code, but there is no difference in the finding of “1”…still see’s it as a 4 or a 7…

This is a situation where capturing an image is your best bet. OCR is designed to be used in situations where capturing images cannot work, or where dynamic text is being used. Since these buttons are static and will not change (and since there are only 10 buttons), it is best to use captured images.


That’s where you’d be wrong, in a perfect world maybe they’d be static, these buttons are developed to look between 3 different fonts (font1, font2, font3), if the OS doesn’t have the font1, it moves to font 2 and so on. So even an image capture of these could possibly be broken with a different let’s say “browser platform”. So basically with your “logic” I’d have to take 30 images. Instead of just calling “1” through your OCR text recognition. I find that hard to believe.

In that case, you would want to create image collections, where there are three different versions of each image (one for each font/platform) in a collection. Then when you want to click on the button, you use the name of the image collection in place of the image name, and eggPlant searches for all three images.
The OCR cannot read all text, and in certain situations, even though it may be slightly less convenient, it is ultimately more efficient to use images than to fight with the OCR.