← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #660875]: Detecting screen changes in a region

 

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

    Status: Answered => Solved

arminius confirmed that the question is solved:
not my variable, I found it on a google search and tried to get it to
work, but found this one way easier.

    def changeHandler(event):
        event.region.somethingChanged = True
        event.region.stopObserver()
    while True:
        nav = Region(129,59,221,266)
        nav.onChange(5,changeHandler)
        nav.somethingChanged = False
        nav.observe(5)
        if nav.somethingChanged:
            print "changed within observation time"
            popup('changed within observation time')
        if not nav.somethingChanged:
            print "did  not change within observation time"
        continue

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