sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #20223
Re: [Question #234584]: How to action for sequence of vertical pictures lined up
Question #234584 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/234584
Status: Open => Answered
RaiMan proposed the following answer:
Lets make a simple example:
- suppose the image pic_1 was found at position (30,30) on the screen being 9 pixels wide and 9 pixels high.
- so the center of pic_1 would be at (35,35)
- so after t = find ("pic1.png").getCenter() t would be a Location having x = 35 and y = 35
now we simply say:
for k in range(5):
print k, t
t = t.below(10)
the printout would show:
0 L(35,35)@S(0)[0,0 1440x900]
1 L(35,45)@S(0)[0,0 1440x900]
2 L(35,55)@S(0)[0,0 1440x900]
3 L(35,65)@S(0)[0,0 1440x900]
4 L(35,75)@S(0)[0,0 1440x900]
as you can see: we start at (35,35) and with every loop turn the point
has moved 10 pixel towards the lower edge of the screen.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.