AutoHotkey Community

It is currently May 27th, 2012, 2:05 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: exitcode conventions?
PostPosted: February 1st, 2010, 5:11 pm 
Offline

Joined: October 18th, 2006, 8:07 pm
Posts: 169
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2010, 5:24 pm 
Offline

Joined: October 18th, 2006, 8:07 pm
Posts: 169
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2010, 11:03 pm 
Offline

Joined: July 6th, 2009, 9:58 pm
Posts: 678
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...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 10:03 am 
Offline

Joined: October 18th, 2006, 8:07 pm
Posts: 169
... so we are agreed it is better to use exitcodes above 15999 then?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 3:08 pm 
Offline

Joined: July 6th, 2009, 9:58 pm
Posts: 678
daorc wrote:
... so we are agreed it is better to use exitcodes above 15999 then?


O rite I misread :P


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: engunneer, nimda, sjc1000 and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group