← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #680301]: collectWords() raises java NPE

 

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

RaiMan proposed the following answer:
The NPE problem is fixed.

collectWords, collectWordsText now return an empty list if no details
are to be returned.

more comments:

# no longer needed wirh 1.1.4+
#Settings.OcrTextRead=True
#Settings.OcrTextSearch=True

match = find("1555512374529.png")
wait(1)
print match # instead of
#print(match.getTarget().getX())
#print(match.getTarget().getY())
#print(match.getW())
#print(match.getH())

# a match is a Region, hence:
words = match.findAllText("Process") # instead of
# words = Region(match.getX(), match.getY(), match.getW(), match.getH()).findAllText("Process")
print(words)

--- Would lowering a matching threshold help?
for working with text, there is no match threshhold: either something is read or not.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.