← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #172506]: about count method in sikuli

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
count = 0
out = file("c:\\count.txt","w")

openApp("C:\Program Files\test\test.exe")
count += 1
out.write("app opened count: %d\n"%count)
wait(1)
for i in range(98):
    openApp("C:\Program Files\test\test.exe")
    count += 1
    out.write("app opened count: %d\n"%count)
    if exists( img [Warning Window: Program Already Running] , 10) :
        type(Key.ENTER) #or click( img [Yes] )
        wait(1)
out.close()

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