Question #700374 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/700374
Status: Open => Answered
RaiMan proposed the following answer:
Since the search time increases with the size of the region, it is
normally not a good idea, to search on the whole screen, if speed
matters. Restrict to a Region as small as possible.
setWaitScanRate(1):
this means, that only once per second an image is looked for until the wait
time is reached (3 seconds in your case). This makes the image search slower,
since in the standard the scan rate is 3 (3 searches per second).
Usually the number of scans per second when searching on the whole screen
cannot be raised dramatically, since one search on a whole screen takes up to
some hundred msecs.
Only with smaller regions a higher scan rate might help.
Since the standard wartime is 3 seconds
if(has(Pattern("1643014040911.png").targetOffset(-49,-1),3)):
click(Pattern("1643014040911.png").targetOffset(-49,-1))
is the same as:
click(Pattern("1643014040911.png").targetOffset(-49,-1))
If not found within 3 secs: FindFailed crash
Since it is in a loop:
try:
click(Pattern("1643014040911.png").targetOffset(-49,-1))
click("1643014901291.png")
except:
pass # or do something
same for:
if(has(Pattern("1643014040911.png").targetOffset(-49,-1),3)):
click(Pattern("1643014040911.png").targetOffset(-49,-1))
better:
if exists(Pattern("1643014040911.png").targetOffset(-49,-1)):
click() # clicks last match in the region
click("1643013175497.png")
click("1643013921634.png")
click("1643013965598.png")
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp