← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #252666]: Observing a region does nothing

 

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

Description changed to:
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:
http://goo.gl/6Wxp3D
http://goo.gl/lN8zQn
http://goo.gl/SdtAAi

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