← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #162596]: How to Change the popup title from sikuli to Something?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
-- indentation errors:
take care, that the indentations are equally produced (recommendation: use tab/shift-tab to indent/dedent one level - supported in the IDE edit menu). Never enter the indentation with blanks - this gets a mess very fast.

-- if/elif/else

abc = "correct password"
password = input("Please enter your password")
if password == abc:
    popup("correct password")
else:
    popup("wrong pass")
    exit() # would end the script here

elif is only of value if you have many different cases to test:

if case1:
   pass
elif case2:
   pass
elif case3:
   pass
else:
   pass

if none of the if/elif return true, the else tree is processed.

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