Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-11 Thread BOCHENG YIN
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 Status: Answered => Solved BOCHENG YIN confirmed that the question is solved: It works! Thank you so much! RaiMan. -- You received this question notification because your team Sikuli Drivers is an

Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-11 Thread RaiMan
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 RaiMan proposed the following answer: I added a note to the docs -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli.

Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-11 Thread RaiMan
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 RaiMan proposed the following answer: I am sorry, for misleading you. I now finally tried myself and had a look into the implementation. This is what currently works in your sense: exitValue =

Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-11 Thread BOCHENG YIN
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 BOCHENG YIN posted a new comment: Hi, RailMan, I just try it. It doesn't work. Let me summarize: [1]if like this: ++ try: runScript("./click.sikuli") exit(0) except:

Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-11 Thread RaiMan
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 RaiMan proposed the following answer: No idea, why, but exit() in the try block leads to the processing of the except block. so do it this way: try: runScript("./testClick.sikuli") except:

Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-10 Thread BOCHENG YIN
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 BOCHENG YIN posted a new comment: Hi, RailMan, I try your code as below: try: runScript("./testClick.sikuli") exit(0) # processed if run ok except: print("sikuli

Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-08 Thread RaiMan
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 RaiMan proposed the following answer: --- runScript("./test2.sikuli",exit(1)). not valid and hence excepts ;-) try: runScript("./test2.sikuli") exit(0) # processed if run ok except:

Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-07 Thread BOCHENG YIN
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 BOCHENG YIN posted a new comment: I think I get the idea to nest a script inside another script. if the nested script fails, it is possible not to halt the host script, but continue. I create a test code.

Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-07 Thread RaiMan
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 Status: Open => Answered RaiMan proposed the following answer: if you run your script from command line, you can play with the exit code. Another option:

Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-07 Thread Mike
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 Mike posted a new comment: I've not done this personally. You can read about RobotFramework here: sikulix-2014.readthedocs.io/en/latest/scenarios.html Command line switches which might help you capture

Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-07 Thread BOCHENG YIN
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 BOCHENG YIN posted a new comment: Mike Thanks! This makes sense to use Outlook or Gmail. However, I want to send a message to warn my work is finished or there is a problem that Sikuli crashes. I am

Re: [Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-06 Thread Mike
Question #679012 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/679012 Mike posted a new comment: Remember Sikulix is a framework for scripting visual interfaces rather than APIs. So rather than trying to use something like smtplib (which doesn't seem to work anyway) why not

[Sikuli-driver] [Question #679012]: send email when script stops at error or finishes

2019-03-06 Thread BOCHENG YIN
New question #679012 on Sikuli: https://answers.launchpad.net/sikuli/+question/679012 I am pretty new in sikuli coding. I want to have sikuli 1.1.4 to send a message to my email when the script stops at errors or finishes. That would help me to monitor an automated unattended work coordinated