← Back to team overview

sikuli-driver team mailing list archive

[Question #657137]: region search work slower

 

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

I have two regions defined on the screen with sikuli tool, at the start of the script 
reg=Region(4,5,590,1010)
reg2=Region(597,5,588,1015)

At some point in the script i'll look for a pattern.
Initially the script was on the entire screen cause i forgot to add the specific region like this:

if not exists(Pattern("1503162296155.png").targetOffset(138,116)):
            return "error"
        click(Pattern("1503162296155.png").targetOffset(138,116))
        wait("1503179918244.png",32)
        click("1503179918244.png")

After i've change the code like this:
if not reg.exists(Pattern("1503162296155.png").targetOffset(138,116)):
            return "error"
        reg.click(Pattern("1503162296155.png").targetOffset(138,116))
        reg.wait("1503179918244.png",32)
        reg.click("1503179918244.png")

the script works 2-3 seconds slower. 
Shouldn't the script work faster with the a smaller region of the screen?



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