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

Hi,

I am using the below script to see how observe is working with onChange. I am 
observing skpe chat window and want to open a popup a message if i receive a 
message in skype chat window. But this is not working. Am i selecting the 
region incorrectly? What is the correct way to select the region?

I am a newbie, please help 

def changed(event):
        popup('something changed')
        print "something changed in ", event.region
        for ch in event.changes:
                ch.highlight() # highlight all changes
        sleep(1)
        for ch in event.changes:
                ch.highlight() # turn off the highlights
with selectRegion("select a region to observe") as r:
    # any change in r larger than 50 pixels would trigger the changed function
    onChange(50, changed)
    observe(background=True)

wait(30) # another way to observe for 30 seconds
r.stopObserver()

-- 
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