← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #271996]: Can't get observer() to work…

 

Question #271996 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/271996

    Status: Open => Answered

RaiMan proposed the following answer:
Sorry for the inconvenience:
I just realized, that the docs are not really up-to-date.

So just for you in advance:

These are the options you have:

--- observe in foreground (script is paused at the observe)
someRegion.observe() # observes FOREVER
someRegion.observe(time) # observes for the given time

--- observe in background (script continues immediately after observe is started)
someRegion.observeInBackground(time) # observes for the given time

--- this is deprecated
someRegion.observe(time, background = True) 
... with the additional impact, that someRegion must be a Jython level Region object (in doubt cast using Region(someRegion))

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