If not exists

Asked by arminius

    if not exists(Pattern("Image A").exact()) or (Pattern("Image B").exact()):
                popup('THE WRONG KIND')

So my program saw Image B, and then it threw up the popup.
At first I was confused, but then I realized it was not seeing Image A.
At least that's what I'm assuming is throwing up the popup.
I really need it to only throw the popup if neither image is seen, if just one is seen it needs to move on without the popup.
Can that be done?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

 if not (exists(Pattern("Image A").exact()) or (Pattern("Image B").exact())):
                popup('THE WRONG KIND')

the brackets make the diff ;-)

Revision history for this message
arminius (arminius75) said :
#2

Thanks RaiMan, that solved my question.