← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #664904]: Log how many times image is clicked

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
You have to learn a bit Python language ;-)

a solution:

loopCount = 0
clickCount = 0
while True
    loopCount += 1
    if exists(image):
        click(image)
        clickCount += 1
   print "loops:", loopCount, " clicks: ", clickCount

If you want to have logging with a time stamp:
http://sikulix-2014.readthedocs.io/en/latest/scripting.html#writing-and-redirecting-log-and-debug-messages

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