Boolean logic - If image exists, then...

Asked by Oh No

Occasionally when I open Windows Movie Maker an error message pops up on the screen. Therefore I need to instruct Sikuli to do something else in the event of the error message. Just that I am totally new to python and struggling with it at the moment.

How can I set up some sort of if statement as follows:

If (find this image), then do ABC.
else do XYZ.

Thanks!
Oh, and of course I can provide more information if necessary.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Oh No
Solved:
Last query:
Last reply:
Revision history for this message
Oh No (123stw) said :
#1

Never mind - I think I found a solution which was to use
if exists(Myimage):
     then....