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

    Status: Answered => Open

Maks is still having a problem:
Hello, RaiMan.
Thank for your answer.
My fault is that I have not explained properly.
Let me describe in details.
For example, we have three collapsing lists in excel (I've uploaded image and 
xlsx example here - 
https://onedrive.live.com/redir?resid=9bd675e55a67fdd0!121&authkey=!AKT5sxVlfQuWhOA&ithint=folder%2cxlsx).
 Each list have plus "+" near to expand it. This is image I'm looking for.

Once we clicked first "plus", it change their image -  becomes "minus".  And 
other pluses changed positions - shifted down.
That's why I'm using recursion - to find "+" again on each step. And 
finder("1429549493296.png") will find only first "+" (and I need only first 
plus, that's why I'm using "break"), but on each iteration first plus for this 
specific iteration will be next for default list. You can try if you have time 
with xlsx uploaded above and code:

def order(match):
    return match.y, match.x
def CLICKER():
    pat = Pattern("1429549493296.png").similar(0.95) # this is plus "+" image
    icons = findAll(pat)
    sorted_icons = sorted(icons, key=order)
    for icon in sorted_icons:
        print icon
        click(icon)
        CLICKER()
        break
CLICKER()

And it clicks all three pluses. That's why I want to add condition hasNext() to 
do not click on the last plus.
Thanks.
Tell me please if you need any additional info.

-- 
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     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to