← Back to team overview

sikuli-driver team mailing list archive

[Question #441903]: Does onAppear() has a minimun default time?

 

New question #441903 on Sikuli:
https://answers.launchpad.net/sikuli/+question/441903

I'm trying to write an instruction to wait for an image appear on the screen, but sometimes my aplication takes too long to show the image, sometimes shows it on a shor period of time.

I'm using

      onAppear(myImage.png, myFunction())

but when my image takes a long time to to be shown, it seems like onAppear has a default waiting time to work, so it breaks the execution before the image be found on the screen.

I've tried to use while, but it doesn't work like I explained above:

     while not find(myImage.png)
     sleep(FOREVER)

Do you know how can I do to wait for 20 seconds for the image, for example, and break the waiting as soon the image appears?


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