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

    Status: Open => Answered

RaiMan proposed the following answer:
this might do what you want.
You have to integrate it into your script accordingly.

changes = None
def changed(e):
    print "**** changed"+str(e.type)+"#"
    global changes
    changes = e.changes

r = Region(0,0,200,200)

r.onChange(changed)

while True:
    r.observe(2)
    if changes: 
        print "changes:", str(changes)
        changes = None
    else:
        break

print "the end"

It worked for me.
Since I had no moving object I just dragged a window so that the region r 
changed. When I stopped dragging, the script ended.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to