sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #02595
[Question #156242]: Use for-loop to observe screen
New question #156242 on Sikuli:
https://answers.launchpad.net/sikuli/+question/156242
I am automating a operation where many possible scenarious could happen. This was the solution you (RaiMan) provided me with yesterday, I think...
Here's the code:
weWait = 100
while weWait >= 0:
im1 = exists(image1)
im2 = exists(image2)
if not (im1 and im2):
wait(3)
if im1:
wait(1)
if not im1:
popup("Finished")
exit(1)
if im2:
okej = find( )
click(okej)
closeApp("MyProgram")
openApp("C:\Program\New Folder\MyProgram)
This solution is working fine and I am comfortable in using it. But. (There's always a but...) I am dealing with a automation with many possible wrong-messages. Is it possible to use another operation than the if-statement in order to control if a wrong-message is displayed on the screen?
I am working on storing all possible wrong-messages in a list and then run a for-loop who reports when a wrong message is found. Will report back with a quickly assembled sample code with how a designed the for-loop.
TYIA
Calle
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.