sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #07243
Re: [Question #177229]: Match all images of the same size
Question #177229 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/177229
Status: Open => Answered
RaiMan proposed the following answer:
--1. click(some_region)
always clicks at the center of that region
--2 f.above(100)
makes a region at (f.x, f.y-100, f.w, 100)
so finally click(f.above(100))
clicks the point that is 50 pixel above the top border of your image.
So if you want to click as you expected your code would do, this is more
efficient (only one find) and works:
m = find("5-1.png")
f = m.getCenter()
f.setY(f.y-int(m.h/2))
for n in range(10):
offset = 100 + n * 100
print offset
click(f.above(offset))
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.