← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #252512]: How to use regions properly

 

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

RaiMan posted a new comment:
at comment #8:

looks ugly because of the many necessary indents
    if clicker(item1)==0:
                        if item2 != 0:
                            if clicker(item2)==0:
                                if item3 != 0:
                                    if clicker(item3)==0:
                                        if item4 != 0:
                                            if clicker(item4)==0:
                  
this is better:
doit =  clicker(item1)==0 and item2 != 0 and clicker(item2)==0 
doit = doit and item3 != 0 and clicker(item3)==0 and item4 != 0 and clicker(item4)==0
if doit:

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