← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #267725]: change findAll WaitTimeout individually, and Wait for Duplicated or Not Img

 

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

Description changed to:
Hi community, I have kinda two questions, but are related to the same
script.

1) I would like to change the default WaitTimeout of a single findAll

I know Settings.AutoWaitTimeout = (seconds) can change the default WaitTimeout in all the script (I don't know why everytime I have tested it, it only applies from the second time I run my script on, the first time I run the script the WaitTimeout remain to the defult value 3secs despite Settings.AutoWaitTimeout is set to 0)
I know also setAutoWaitTimeout = (seconds) set the maximum waiting time for all subsequent find operations. (no matter if I put this action inside a function? other findAll op will change its WaitTimeout no matte if they are inside other functions?)

So if I want to change the default WaitTimeout only for a single findAll
op, I should use two "setAutoWaitTimeout", one before, and another after
the findAll op, Iam right? is this the only way?

isn't anything like...
if exist (Img, 0.2): #where 0.2 is the wait time and can be changed
but applied to findAll?

2) Another trick that I would like to achieve is... How can I wait for
an Image (eg. RedStartImg) but sometimes there is already a RedStartImg
in the screen and it will appear a second one, How can I wait for that
second RedStartImg? sometimes there are two RedStartImg and it will
appear a third one, some times there is None and it will appear one, How
can I wait for that RedStartImage in this case? I know that
RedStartImage takes to appear from 0.5 to 2 secs.

Thanks Advanced.

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