sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #29817
[Question #259668]: onVanish() - Handler
New question #259668 on Sikuli:
https://answers.launchpad.net/sikuli/+question/259668
Version: 1.1.0 2014-12-23_01:00nightly
Language: Python
Code:
###
def myHandler(event):
a = 1
reg.setROI(10,10,10,10)
reg = Region(0,0,1400,800)
a = 0
reg.onVanish("1419518759619.png", myHandler)
reg.observe(background = False)
reg.stopObserver()
print a
print reg.getX(), reg.getY(), reg.getW(), reg.getH()
###
Question:
Hey all! First, english isn't my native language, so sorry for my possible mistakes :(
I'm trying to use onVanish() function, but it doesn't work. I wrote a little script to test it and my pattern that i used is a screenshoot file. First i open the screenshot, then i run the script with the IDE. It will be forever open if i don't do anything, but if i close the screenshot the script finishes, so i assume that onVanish() triggers correctly. But the result of the prints are:
0
0 0 1400 800
Although it triggers, it doesn't seem to call my handler. If i use onAppear() in this example the handler function will work correctly and will be called. Is it a bug? Or what am i doing wrong?
Thanks :)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.