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

Description changed to:
------------------- general information
- all Region attributes are only defined at the Java level and private in class 
Region
- hence they cannot be accessed directly, but only by using the defined setters 
and getters
- these are the attributes
  - autoWaitTimeout: initialized with the respective Settings attribute, 
accessible via setAutoWaitTimeout/getAutoWaitTimeout
  - waitScanRate/observeScanrate: same principle
------------------- usage of the different attributes when searching for an 
image
- if no special wait time is given with the wait/exists, the default is used, 
which might be specified for the respective region using setAutoWaitTimeout
- if a special wait time is given with the wait/exists, this value is used for 
the maximum wait time.
- if the given wait time is given as 0, only one search is done
- if the given wait time is given as > 0, at least one search is done
- if the wait time is not yet exceeded, the search is repeated after a pause 
(including the search time) given by the waitScanrate.

-------------------------------------------------------------------------- 
Hi,
I'm trying to set Region‘s autowaittimeout. Because of the time i find a img 
can be estimated, so i don't want wait the result too long for 3s.
But after  modified region's autowaittingout or exists(img,0.2),  the script 
will still spend more secons to  find the image.
It's my test script below:


import time
a = Region(0,0,1759,991)
a.WaitScanRate = 0.2
a.ObserveScanRate = 0.2
start = time.time()
a.AutoWaitTimeout =0.1
print a.getAutoWaitTimeout()

b = a.exists("1504517680223.png",0.5)

end = time.time()
print "exists: %f s" % (end - start)


it will spend 3s if can't find the img

I don't know where is wrong.
And another question is that in what case we can use exists(img,0)?


Thanks,
Wendell

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to