← Back to team overview

sikuli-driver team mailing list archive

[Question #268710]: Trap Error

 

New question #268710 on Sikuli:
https://answers.launchpad.net/sikuli/+question/268710

Looked at https://answers.launchpad.net/sikuli/+question/101431
example given works fine but cannot work out how to implement it
My Script
Many:-
def something_1():
      find click or wait       
def something_2():
      find click or wait
def something_3():
      find click or wait
def something_4():
      find click or wait
def something_5():
      find click or wait
# My Main
def This_Is_Main()
     something_1()
     something_2()
     something_3()
     something_4()
     something_5()
# Run Main
This_Is_Main()

what I want to do is trap any errors - add 1 to a counter and do
This_Is_Main() again if the counter is less than 3
I know that the screen that I am looking at changes occasionally and any find errors can be ignored
also because the next task in the list needs to run then I don't want an exception to stop the whole process
this part of the task is done with
/Applications/Sikuli/runsikulix -r /Users/Jeff/Desktop/SikuliScripts/Run_Startup.sikuli >> /Users/Jeff/Desktop/SikuliScripts/This_log.txt
where I keep a record of errors in   This_log.txt


Can anyone please help

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