← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #235394]: Can we have a check whether a text is present in particular region

 

Question #235394 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/235394

    Status: Open => Answered

RaiMan proposed the following answer:
--- Here it reads the first charachter of the text and matches it.
giving a string to for x in y, will loop for each character in y

so you would have to say
a = ('grapes',)
or 
a = ['grapes']
or
a = list('grapes')

--- words not found
Since the text feature is still very unstable, you have to check, what Sikuli reads from the screen.
So first use:
print selectRegion().text()

and select as region one of the words with each run.

the output will tell you what Sikuli sees ;-)

If it is not as expected, you will not have any chance with the text
feature on your text font.

BTW: are you on version 1.0.1 ??

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.