← Back to team overview

sikuli-driver team mailing list archive

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

 

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

Hi! 

Here is the similar picture I use  in Sikuli:
  http://imgur.com/a/v1Ft5

Here is my code:

target = find(target_pic)            #the link above
scene_list = ["","","","","",""]
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)


  Sometimes when it runs, the position of scene[4] and scene[5] will move too East from the target.
For example, it would move from middle of scene[5], to the "wrong point" in the picture.

I am sure there is other similar picture when running the script(by using setROI )

And when it happens, restart the sikuli would be Okay then.

But I still want to know is there any other workaround that I can do.

Information:
  Using sikuli 1.1.1 build 2017-03-30 01:00
  Window 10
  CPU usage 55% max when running
  RAM usage 40 % max when running

            Thank you!




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