Comment 1 for bug 1199882

Revision history for this message
RaiMan (raimund-hocke) wrote : Re: .observe quits before it should be finished

Thanks for testing and evaluating.
At least the observe has some quirks ;-)

Today I went through the observe implementation and added some features and a better (LOL) debug log.

It will be available with the service update 1.0.1 end July.

- in the handler function you can decide to repeat the onAppear when coming back from the handler
e.repeat(time)
a time value in seconds waits for the target to vanish again before searching again (default region.AutoWaitTimeout)
this repeated onAppear is of value when you run the observe in the background.
(not restricting to the first appear in the RC3 version may lead to fancy loops ;-)

- e.getCount() gives you a number how many times, the handler was visited

- you can say e.stopObserver() instead of e.region.stopObserver()

--- different image sets
This is best done with some images.sikuli, that is imported and has images stored in variables with some naming conventions or other structures, that allow to select a set depending on the current runtime situation.