sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03486
Re: [Question #162215]: r.getLastMatch() returns null when r=!null, where r=exists(pattern)
Question #162215 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/162215
Status: Open => Answered
RaiMan proposed the following answer:
the getLastMatch() is an attribute of the region that was last searched.
So if you want to use getLastMatch() in yor case, it is
s.getLastMatch()
The other problem:
exists() returns a Match object. So if you want to use getScore, you
have to assign the result of exists() to a Match object, since Region
objects do not have a score attribute.
Match m = s.exists()
Float sc = m.getscore()
should work.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.