← Back to team overview

sikuli-driver team mailing list archive

[Question #252666]: Observing a region does nothing

 

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

Hello,

I have been trying to get a simple Observer up and running but while it compiles okay, nothing happens when I run it.

Here is the code:

from sikuli import *
import os 

def myHandler(event): 
    popup("Found it")
    event.region.stopObserver()

myRegion = Region(find("winStart.png").right(1547))
myRegion.onAppear("skype.png", myHandler) 
myRegion.observe(FOREVER, background = False) 

What I am testing here is that when the Skype Login screen appears on the taskbar, the handler should kick in.
However the program just executes and finished immediately. Any help is appreciated.

Here are some images to illustrate:

The Region I am using:
http://goo.gl/YoKP9O

The Code as it appears in sikuli:
http://goo.gl/sh0y6P

The other graphics
http://goo.gl/k2jvPK
http://goo.gl/MF7W2t





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