← Back to team overview

sikuli-driver team mailing list archive

[Question #697768]: oberserveInBackground question

 

New question #697768 on SikuliX:
https://answers.launchpad.net/sikuli/+question/697768

Hey,

I am trying to use the observeInBackground() function to react, if a notification pops up.
I red all the documentation, but looks like I can not find how to use this in subthread while my script is running...

can someone help me how to observeInBackground() if an image appears and how to define any action, that should be followed, while pausing the main thread?

I tried this, found in the another post:

R = Region(103,957,437,64)
def axn(event):
    event.getRegion().highlight(3)

R.onAppear(Footer2,axn)
R.observeInBackground(FOREVER)

but still don't know how to set an if condition when image is found....

greetings and thx for helping.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.