← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #675373]: [HowTo] make a simple loop with "exists image" and "click image"? (Sikuli)

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
sorry, missed your comment #13 and adding idea for #14

# this is step1
      if exists("img1", 0) and exists("img11", 0): # check for img11
        doubleClick("img111")
        start = time.time() # save current time
        while exists("img11", 0):
          wait(0.3) # wait for img11 to vanish
        while time.time() < (start + 3):
          if not exists(img1, 0):
            break
        if exists(img1, 0):
          doubleClick(img2)
          continue # repeat the outer loop
        if exists("img3", 0) and exists("img31", 0):
          doubleClick(img2)
          doubleClick(img111)


--- 17 repeat until img1 vanishes
everything from beginning or what?

You now have 2 problems:
- I cannot see, that your Python knowledge raises, which decreases my willingness to help
- I will not be available until after Nov. 19th and only answer very important requests

All the best

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