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

I have a script where i search images one after the other because I can't 
figure out how to search them all at once. I have a feeling the observe 
function might be my answer but don't understand it well enough.

I know how to set ROI and I have. The reason they are being changed in the 
script so many times is because if it finds a match and clicks the region needs 
to change.

The problem is that I need to speed this up significantly. Right now it is 
searching for 1 image at a time. There are about 10 images (this is not the 
whole script) and I would like to add more.

Also I found out that the coordinates for setROI cannot be decimals.  Is there 
a way to round those numbers up or down? (its not giving me an error now 
because x and y are set to 1)

    setROI(90/x,95/y,700/x,400/y)
    for pick in range(1): 
        type(Key.ALT)
        if exists(Pattern("1342385078677.png").similar(0.99)):
            click(getLastMatch())
            setROI(440/x,200/y,975/x,535/y)
            wait(1)
        if exists(Pattern("1342388811042.png").similar(0.99)):
            click(getLastMatch())
            setROI(440/x,200/y,975/x,535/y)
            wait(1)
        if exists(Pattern("1342388633408.png").similar(0.99)):
            click(getLastMatch())
            setROI(440/x,200/y,975/x,535/y)
            wait(1)
        type(Key.ALT)
        if exists(Pattern("J.png").similar(0.99)):
            click(getLastMatch())
            setROI(440/x,200/y,975/x,535/y)
            wait(1)
        if exists(Pattern("1342388876296.png").similar(0.99)):
            click(getLastMatch())
            setROI(440/x,200/y,975/x,535/y)
            wait(1)

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to