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

Hi there,

i need to wait for one of two images aroud 30 or 240 sec max, and depends on 
what img is shown do some actions. 
Is it possible to do something like that statement?

if wait(IMG1, 240) or wait(IMG2, 240): #script is waiting for one of the images 
to appear and after i do statement depends on what img appeared
if exists(IMG1) :
     do some action
elif exists(IMG2): 
    do another action

now im waiting for IMG1 "wait(IMG1, 240).highlight(1)" which is the best for me 
becouse IMG1 is appearing more than 80% time, and wait(IMG, 240) can recognise 
him even if he appear in 40 sec and after that it clicks it instantly without 
waiting full 240 sec. If IMG2 is appear i ofcourse got error and need to run 
script again... i want to avoid that ;)

PS i dont want to use if exists(IMG, 240)  like in 
https://answers.launchpad.net/sikuli/+question/644269 
becouse i dont want to wait full 240 sec always, especially when exists() is 
called sequentially it means that if IMG2 appear i would wait 480 sec to do 
action... only action after img shown is acceptable for me if it's possible of 
course :)

Thank You in advance



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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to