← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #238811]: How to repeat action unitil an image appears and then resume script?

 

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

    Status: Open => Answered

Eugene S proposed the following answer:
You can just add and "if exists(image)" clause at some point of your loop to check whether this image exists.
If yes - press the button, if not - just continue.

the code will look something like that:

while True: #Main loop
  if exists(image): # Each time check for the image
    type(Key.RIGHT)

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