← Back to team overview

sikuli-driver team mailing list archive

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

 

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

Hi everybody !
I need help for my script... 
#1st line
def my_find(str):
    while len(str) > 1 :
        str2 = (str[len(str)-1:]
        return my_find(str2).nearby(30)
    RegionSearch = find(str+".png")
    return RegionSearch
#End my_find
#indent correct
doubleClick(my_find("AFR1234")

I'm working on an airport software and i want to create a "SearchingTool" :
Write the name of the airplane, doubleClick on the Airplane in the software... 
My function is working but it doesn't click on the good airplane 
I think THE while isn't working. I need help please :)

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