← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #258380]: Any way to restart Sikuli script execution?

 

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

Vit proposed the following answer:

1) Save 3 files in the same folder (for example: test1.sikuli, test2.sikuli, test3.sikuli)  

2) #test1.sikuli code:
import test2
import test3
test2.script()

3) #test2.sikuli code:
from sikuli import *
def script():
    try:
       # paste your code here! 
    except FindFailed: 
        import test3
        test3.script()

4) #test3.sikuli code:
from sikuli import *
def script():
    import test2
    test2.script()
5) Profit!

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.