sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #27573
Re: [Question #252798]: how to get coordinates in two image files
Question #252798 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252798
Status: Open => Answered
RaiMan proposed the following answer:
supposing Jython scripting (IDE)
f = Finder(imageB)
f.find(imageA)
if f.hasNext():
print "found B in A at ( %d, %d )"%(f.next().x, f.next().y)
else:
print "B not in A"
if B is more than once in A, it is not predictable, what B will be
found.
to get all appearances in arbitrary order:
f = Finder(imageB)
f.findAll(imageA)
if f.hasNext():
while f.hasNext():
print "found B in A at ( %d, %d )"%(f.next().x, f.next().y)
else:
print "B not in A"
the coordinates are relative to the top left corner of A being (0, 0)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.