sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #09209
Re: [Question #189606]: Want to use 2 images in if exists statement
Question #189606 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/189606
RaiMan proposed the following answer:
Ok, if this should do what you want:
max = 10.0 # max waiting time in seconds
pause = 0.0 # pause in seconds between search trials
start = time.time()
found = False
while time.time()-start < max:
if exists(imgA, 0) or exists(imgB, 0):
found = True
break
if pause > 0: wait(pause)
if found:
print "either imgA or imgB is there"
else:
print "not there"
If you need the information, which one appeared, you have to adapt the
second above solution into the loop.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.