if wait(img1) or wait(img2) in statement
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:/
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
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Adrian for more information if necessary.