sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #14667
Re: [Question #214691]: Speed up while loop?
Question #214691 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/214691
Status: Open => Answered
j proposed the following answer:
The most time is spent when the image is searched in the "exists" command.
So if "ETASbyCountr.png" doesn't move on the screen, you could use a smaller region to search for the reg pattern:
searchRegion = Region.create(x,y,w,h,) # create region containing your image
while not searchRegion.exists(reg, 0):
wheel(Location(416,422), WHEEL_DOWN, steps)
Now Sikuli will search for the image inside that region instead of the
whole screen.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.