AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

passing error codes through program levels?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ed196



Joined: 02 Dec 2009
Posts: 6

PostPosted: Wed Dec 09, 2009 6:41 pm    Post subject: passing error codes through program levels? Reply with quote

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
View user's profile Send private message
Guest






PostPosted: Wed Dec 09, 2009 7:18 pm    Post subject: Reply with quote

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

PostPosted: Wed Dec 09, 2009 7:54 pm    Post subject: Re: passing error codes through program levels? Reply with quote

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
View user's profile Send private message
ed196



Joined: 02 Dec 2009
Posts: 6

PostPosted: Thu Dec 10, 2009 12:28 pm    Post subject: Reply with quote

Thanks: A combination of Exit/ExitApp/ErrorCode and ErrorLevel has solved all the communication problems.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group