| View previous topic :: View next topic |
| Author |
Message |
ed196
Joined: 02 Dec 2009 Posts: 6
|
Posted: Wed Dec 09, 2009 6:41 pm Post subject: passing error codes through program levels? |
|
|
Have read various sections in help/faq, but still can't get logic to recognise when to stop due to an error detected at a lower level of program. Will try and explain:
Have a script that uses RunWait to launch several other scripts in sequence. Using ErrorLevel, can detect if launch of script has failed and put out message and then abort processing. But if launch is succesful, the launched script can then call various functions and within several of these I can detect an error condition and put out a suitable message and use ExitApp to kill the launched script, but can't find a way of then telling the script containing the next lauch process to also stop....
Any guidance appreciated. Thanks. |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Dec 09, 2009 7:18 pm Post subject: |
|
|
u can put those series of instructions into a settimer label
when u want to terminate that function immediately, just use settimer off |
|
| Back to top |
|
 |
hd0202
Joined: 13 Aug 2006 Posts: 265 Location: Germany
|
Posted: Wed Dec 09, 2009 7:54 pm Post subject: Re: passing error codes through program levels? |
|
|
Use ExitApp with ExitCode, you will find the given ExitCode as ErrorLevel in your calling script
or connect them via
Terminal Script for communication between scripts
http://www.autohotkey.com/forum/topic4972.html
Hubert |
|
| Back to top |
|
 |
ed196
Joined: 02 Dec 2009 Posts: 6
|
Posted: Thu Dec 10, 2009 12:28 pm Post subject: |
|
|
| Thanks: A combination of Exit/ExitApp/ErrorCode and ErrorLevel has solved all the communication problems. |
|
| Back to top |
|
 |
|