region.find("some text")

Asked by Elena

I have some troubles with region.find("text") .

If I target it on e.g. Menu item of the desktop app main menu, it works fine.
But if targeting on UI that's being drawn by open GL (the text font is just the same) it gives me

Exception in thread "main" FindFailed: can not find World on the screen.
Line ?, in File ?
 at org.sikuli.script.Region.handleFindFailed(Region.java:420)
 at org.sikuli.script.Region.wait(Region.java:511)
 at org.sikuli.script.Region.find(Region.java:381)
 at TestSikuli.main(TestSikuli.java:21)
Using substitute bounding box at (36,0)->(226,12)
Using substitute bounding box at (14,9)->(36,26)
Using substitute bounding box at (0,0)->(10,10)
Using substitute bounding box at (14,9)->(36,26).

Are there any limitations on where this method actually works?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

use latest version r930
http://sikuli.org/download.shtml#last-build

and be aware: bug 710586

Revision history for this message
Elena (el-savinova) said :
#2

I have the latest build r930.
But the problem still occurs. I know that the text recognition is in beta and still has a lot of problems.

"Reading" a text with text() methods works though the "recognized" text looks mostly corrupted. But it doesn't give an error at least.
But what bothers me here, is that OpenGL UI is supposed to be supported by region.find() or not?

Revision history for this message
RaiMan (raimund-hocke) said :
#3

GUI or application specific aspects do not matter for Sikuli - what counts are the pixels on the screen.

So region.find() using images works, but region.find("some text") has the known problems.

So try to restrict the search region as much as possible.

If the text you are searching for is not read correctly using region.text(), then the probability, that finding the text works is very low.

Can you help with this problem?

Provide an answer of your own, or ask Elena for more information if necessary.

To post a message you must log in.