← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #216763]: How to write a while command in java using sikuli script.jar file

 

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

    Status: Open => Answered

Roman Podolyan proposed the following answer:
As far as I remember, I saw similar topic recently....  
There was advised  to use region.exists(), not region.find() .  
In Sikuli IDE I could use it in code like this: 

while not(back_region.exists(back_image)):
                x = random.randint(0,max_x)
                y = random.randint(0,max_y)
                ....
 
I'm not that familiar with Java, but you can check what region.exists() returns.

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