← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #676658]: how does observeEvent work exactly ?

 

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

    Status: Open => Needs information

RaiMan requested more information:
I have to check.

In fact it should work like you thought it should work ;-)

Is the phone_region always the same Region OBJECT?

try to define the phone_region once outside the loop together with the 
phone_region.onChange(50,handler) # observe for changes in region

so your function should only be:
def observe_and_click(phone_region, pixel_region, handler, observe_time):
    pixel_region.click() # make pixel click on region
    phone_region.observe(observe_time) # how long to observe for

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