← 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

    Status: Open => Answered

dinev proposed the following answer:
Can you try replacing this part :

#####
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)
######


with this:

#####
mouseMove(target)
sleep(1)
mouseMove((- scene_offset*3), 0)
for i in range(1,6) :
    mouseMove(scene_offset,0)
    sleep(0.5)
######

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