If not exists

Asked by arminius on 2018-04-18

    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:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2018-05-06
Last query:
2018-05-06
Last reply:
2018-04-18
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 ;-)

arminius (arminius75) said : #2

Thanks RaiMan, that solved my question.