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 

exitcode conventions?

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



Joined: 18 Oct 2006
Posts: 169

PostPosted: Mon Feb 01, 2010 4:11 pm    Post subject: exitcode conventions? Reply with quote

Hello,

Does anyone know of any conventions for using exitcode. Are there any values to avoid using?

For example, I have A.ahk using runwait to run B.ahk, and wants to know how B.ahk got on (using errorlevel).

Can B.ahk use the exitcode "10" to mean "I couldn't do X" and 11 for "I couldn't do Y"?

I know this is possible, but I want to know if it's really ok to do. is there any other way that an exitcode of "10" could be given without me wanting it to be (either by something to do with Windows or something built in to AutoHotkey?

Sorry for the confusing message, I hope it makes sense!
Back to top
View user's profile Send private message
daorc



Joined: 18 Oct 2006
Posts: 169

PostPosted: Mon Feb 01, 2010 4:24 pm    Post subject: Reply with quote

To answer my own question (I think ...), it might be best to avoid exitcodes from 1 to 15999, which each have specific meanings in Windows

http://msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx

Any wiser suggestions welcome!
Back to top
View user's profile Send private message
randallf



Joined: 06 Jul 2009
Posts: 678

PostPosted: Mon Feb 01, 2010 10:03 pm    Post subject: Reply with quote

I actually might not use those unless they are on-the-spot applicable... they are already matched to items in windows and if other things depend on the code...
Back to top
View user's profile Send private message
daorc



Joined: 18 Oct 2006
Posts: 169

PostPosted: Tue Feb 02, 2010 9:03 am    Post subject: Reply with quote

... so we are agreed it is better to use exitcodes above 15999 then?
Back to top
View user's profile Send private message
randallf



Joined: 06 Jul 2009
Posts: 678

PostPosted: Tue Feb 02, 2010 2:08 pm    Post subject: Reply with quote

daorc wrote:
... so we are agreed it is better to use exitcodes above 15999 then?


O rite I misread Razz
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