← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #658728]: How to work around an occasional image

 

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

    Status: Answered => Open

DAVID MASTROIANNI is still having a problem:
Hi ndinev,
Yes I do have images A through Z and Images 1, 2 and 3.
===========================================================================
def WaitMainImage(mainImage):
 while True:
    if exists(mainImage): click(); return
    if exists("image1.png": click()
    if exists("image2.png"): click()
    if exists("image3.png"): click()
wait(Image_A, FOREVER)
click(Image_A)
wait(Image_B, FOREVER)
etc.
===========================================================================
The good news is the script runs and starts waiting for image A and clicks image A, and continues
The bad news is when Image1 and Image2 showed up nothing happened.
So the question is: Why isn't the "if exists(image): click()" working?

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