← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #252488]: making loops and adding a counter

 

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

    Status: Answered => Open

Richi is still having a problem:
Hi,

i have tried the code lines below but it is not working.

this is the path to my log file as i want the log file to be on the
desktop-->     C:\\Users\\Richi\\Desktop\\

Can someone help me to modify the code lines below in order that :

if after the 3rd loop, sikuli stops, a log file is generated in which it
states that ,at the 3rd loop, sikuli stopped, please?




import time

count = 1

for i in range(4): #To run 5 times

     print "This is run number %s" %(count)

     a = time.clock()
    
     doubleClick("image1.png")
     wait(1)
     hover("image2.png")
     hover(“image3.png)
     wait(2
     click("image5.png")

     print " Run time: ",time.clock()-a,"seconds"

     print "_____________________"

   
    dir = “C:\\Users\\Richi\\Desktop\\”

    Debug.setUserLogFile("dir")

    Debug.user("finished %d loop", i)

     count += 1

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