sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #40427
Re: [Question #403018]: Pass value from handler (on appear) to main script
Question #403018 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/403018
Status: Needs information => Open
spyros-liakos gave more information on the question:
Thanks for replying..!
I want to observe always for an error popup in the program i use. The
error is a internet connection error. If this happen i know how to wait
and solve it. But then i want the script to start from the begin..
For example i got this:
def start():
click("start.png")
def play():
click("play.png")
def finish():
click("close.png")
#begin the script
for x in range(100)
if error = True:
finish()
start()
if error = True:
finish()
play()
if error = True:
finish()
finish()
#the observe always
def handler():
error = True
#some function to solve the error
onAppear("error.png", handler)
observe(FOREVER)
while True:
observe()
My think is to have an "if" before every function and if value "error =
True" will pass all functions and start from the begin of the loop.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.