← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #284364]: how to use while len(string) > 1 : ??

 

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

    Status: Answered => Open

VincentDugue is still having a problem:
thank for you reply Karl,
I tried it and it works a little :P
My last script for this function was :
#first line
def my_find(region, str):
    if (len(str)>1):
        regioni = my_find(region, str[0])
        while regioni.hasNext():
            referenceRegion = regioni.next()
            try:
                return my_find(referenceRegion.nearby(50),str[1:])
            except:
                pass
    else:
            picti = str[0]+".png"
            try:
                regionfound = region.findAll(Pattern(picti).exact)
                return regionfound
            except:
                pass
#last line

It work a lil too but i think i have too mix both script to finally get my function 
if you have any idea to do it, please say it to me 
Thanks a lot for everything

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