← Back to team overview

sikuli-driver team mailing list archive

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

 

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

    while True:
    bigScreenReg = Region(1242,57,123,640)
    bigScreenReg.highlight(3)
    r = bigScreenReg
    r.onChange(100, changed)
    Settings.isChanged = False

    r.observe(5) # observing for 5 seconds (script pauses here)

    if Settings.isChanged: # check wether the handler was called (because there where changes)
        popup('there have been changes')
    else:
        print "there haven't been any changes"
    continue

It seems to be highlighting when there are changes in the region, but the popup never get's activated, the log just forever is filled with "there haven't been any changes" even though there were definitely changes in the region that I observed.

Basically I just want it to throw a popup when there are changes in the region.

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