sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #04842
Re: [Question #168734]: use in
Question #168734 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/168734
RaiMan proposed the following answer:
**** @vitalliuss
a bit misleading: the result of a find is a match not an image.
It is generally more obvious/transparent this way, if you need the match afterwards
click(image)
match = getLastMatch()
if match.x < some_value:
print "yes, we got it"
else:
print "sorry, that was the wrong one"
One more thing: formatted output
print "X:%d Y:%d"%(match.x, match.y)
or simply
print match
which gives a readable representation of the match contents
**** @ledenomejojo
If your problem is, that you want to know wether/be sure that you have clicked on the right button, it is recommended, to restrict the region, where to search to the area, where the image most probably can be found:
you might try this in IDE:
reg = selectRegion() # select the area that contains the button
reg.click(image)
If this helps, replace selectRegion() by some other evaluation.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.