← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #254856]: [1.0.1] exists(img, 0): getting some seconds of find time in cases where a larger image is not visible

 

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

RaiMan proposed the following answer:
BTW: this is my test script (version 1.1.0):

# some base image to start with
base = find("1411456264567.png")

#create a small image
m = base.getCenter().grow(50)
small = Pattern(capture(m)).exact()

# create a medium image
m1 = grow(m.getTopLeft(), 0, 0, 570, 500)
medium = Pattern(capture(m1)).exact()

#create the large image
m2 = Region(SCREEN)
large = Pattern(capture(m2)).exact()

# hide the stuff
if Settings.isWindows():
  switchApp("SourceTree")
else:
  switchApp("Finder")
wait(1)

# try to find
for i in range(2):
  exists(small, 0)
  print "small:", getLastTime()
print m
for i in range(2):
  exists(medium, 0)
  print "medium:", getLastTime()
print m1
for i in range(2):
  exists(large, 0)
  print "large:", getLastTime()
print m2

… and I get this on my good old MacPro (Xeon 2,66 16GB)

small: 2223
small: 2180
R[40,39 50x50]@S(0)[0,0 1920x1200] E:Y, T:3,0

medium: 3318
medium: 3297
R[40,39 570x500]@S(0)[0,0 1920x1200] E:Y, T:3,0

large: 14796
large: 14856
R[0,0 1920x1200]@S(0)[0,0 1920x1200] E:Y, T:3,0

… so be happy with you machine ;-)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.