← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #269185]: OnAppear and OnVanish on the same region

 

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

Tetsuo gave more information on the question:
Ok. Here is the result:

Code:

def myHandler(event):
        print("APPEAR") 
        event.getRegion().setInactive(appear_handler)
        event.repeat()

Main:
appear_handler = myRegion.onAppear(avatar,myHandler)

Output:

debug] Observer: APPEAR: 1437486889624 with: Avatar.png at: M[192,161 44x43]@S(S(0)[0,0 1440x900]) S:1,00 C:214,182 [33 msec]
[debug] Image: reused: Avatar.png (file:/D:/USERS/tetsuo/Desktop/Pessoal/BOT/MAIN.sikuli/Avatar.png)
[debug] Observer: running call back: APPEAR
APPEAR 
[debug] Observer: repeat (APPEAR): 1437486889624 after 1 seconds

After printing APPEAR it goes to the repeat in debug. Is setInactive
supposed to print something in Debug mode?

Its not working. The script keeps printing APPEAR.
I have deleted everything in the script to make it as simple as possible.

Thanks.

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