← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #184000]: Please let me know how to get the log file of the sikuli?

 

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

RaiMan posted a new comment:
sorry, the code ;-)

def log(typ, msg):
    if loglevel >= 0 and typ == 0:
        print "[myinfo]", msg
    elif loglevel >= 1 and typ == 1:
        print "[mydebug]", msg
    elif  loglevel >= 2 and typ == 2:
        print "[myerror]", msg
        
logLevel = 2
log(0, "script started")
click("1325080524703.png")
pos = getLastMatch()
steps = 1
max = 100
img = ("HarshaS.png")
log(1, "wheeldown: max = %d, steps = %d"%(max, steps))
while max > 0:
    if not exists(img, 0):
        wheel(pos,WHEEL_DOWN,steps)
        max -= 1
        log(1, "wheeldown once")
    else:
        click (getLastMatch())
        log(0, "%s found"%(img))
        break
else:
    log(2, "%s not found"%(img))
    exit(1)

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