← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #235440]: Region() example help

 

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

    Status: Answered => Open

rlkee888 is still having a problem:
Hi @RaiMan,

I updated it to use the region, however based on the logs and the time
it takes to find the image it seems as if it is still scanning the whole
screen. Please see here...

#Test the department sale button
if not exists("department.png"):
    popup("Oops...!!! Check that you are on the sales menu")
    exit(1)
else:
    hover("department.png")
    click()
#Define a region for Sikuli to scan for
reg = Region(131,154,512,415)
while not reg.exists("dept_list.png"):
    reg.click("scroll_btn.png")
    click(reg.getLastMatch()) # I used this to speed up the scan and it works
if reg.exists("dept_list.png"):
    reg.click("ok_btn.png")
    wait("1378803496852.png")
    type("1000" + Key.ENTER)
else:
    print"not found:test department"
 
#this is the log file
[log] CLICK on L(843,126)@S(0)[0,0 1596x821] # this log shows it clicked image "department.png"

[log] CLICK on L(614,419)@S(0)[0,0 1596x821] # this log shows it clicked
image "scroll_btn.png"

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(614,419)@S(0)[0,0 1596x821]

[log] CLICK on L(485,534)@S(0)[0,0 1596x821]

[log] TYPE "1000#ENTER."

Is it correct to assume that the area in the log file [0,0 1596x821] is
the area Sikuli is still scanning the full screen and not the area in
the region that was declared?

This whole exercise is to see if it scan and click faster.

Thank you,
Robin

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