← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #654227]: Use offset(Location(x, y)} but get wrong position some time

 

Question #654227 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/654227

YO gave more information on the question:
Sorry for the Code, I have made some correction by adding extra scene_list[0].
Using the picture http://imgur.com/a/v1Ft5
and the code below, may get the same result sometimes.


sleep(1)
scene_offset = 200
target = find(Pattern("1501664009243.png").similar(0.50)) #please use the link above for the .png
mouseMove(target)
sleep(1)
scene_list = ["","","","","",""]
scene_list[0] = target.offset(Location((- scene_offset*3), 0))
scene_list[1] = target.offset(Location((- scene_offset*2), 0))
scene_list[2] = target.offset(Location((- scene_offset*1), 0))
scene_list[3] = target.offset(Location(0, 0))
scene_list[4] = target.offset(Location((scene_offset*1), 0))
scene_list[5] = target.offset(Location((scene_offset*2), 0))

for pos in scene_list :
    mouseMove(pos)
    sleep(0.5)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.