Pass value from handler (on appear) to main script
Hello and really thanks for support.!!
Im trying to get the value from the handler to my main script. So when an observe is happen i can send my script flow to any direction....
The philosophy is to catch errors while the script is running and if so to call specific functions.
*Im not a great programmer thats why i'v been stuck.. and need help please... :)
My code:
#functions popup
def p1():
popup("hi1")
def p2():
popup("h2")
def p3():
popup("h3")
def p4():
popup("h4")
def p5():
popup("h5")
#check if handler is activated
if myvar == 22:
p5()
else:
p1()
#handel for onappear
def handler():
myvar = 11
#onappear method
onAppear(
observe(FOREVER)
while True:
observe()
The error ofcource: [error] NameError ( name 'myvar' is not defined )
*Working on Sikuli 1.1.0
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- spyros-liakos
- Solved:
- Last query:
- Last reply: