← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #171845]: I cant count!!

 

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

    Status: Open => Answered

Dude proposed the following answer:
Hi,

In ur code off course u will get zero, u r assigning a=0 , and u r calling that function countOne(a):
, but u r not returning any value inside that function. by default it assign a as zero.

This code might help to solve ur problem

def addOne(a):
    a +=1
    return a

count = 0
while exists("C:\images\icon1.png",30):
    count = addOne(count)
    popup(str(count))

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