search for an image in parallel

Asked by ALEXANDROS SKAMPARDONIS on 2020-05-08

I have a script that runs real time according to what happens within a game.
The problem I face, is that I would like to always check if an image appears, and if so, I would like to immediately stop the execution of first script, and do something else.

I have tried to insert multiple checks in many places of the original script, but this is not really sufficient enough, and also seems to complicate the development of the script quite a lot.

I wonder if there is a way, to perhaps run another instance of sikuli in parallel with the first one, and then if the seconds catches that image, stop the execution of the first (or more ideally, stop the execution of the current command of the first script, and continue execution from another point).

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:

This is great masuo, exactly what I was looking for.
The theory seems to meet my expectations, I now have to understand it and implement it. Perhaps if you know where I can find an example of how to use the 'Observerer' would help me quite a lot.

Thanks alot!

Thanks masuo, that solved my question.