Login | |
|
 |
RE: EMWProf caller login script - 6/19/2006 12:14:11 AM
|
|
 |
|
| |
ebgreen
Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
|
Thanks for sharing your script. The comment block at the top with the explanation of purpose and what a user would need to tweak in the script is great. I did put it into a code block to make it a little more browser friendly. There are some things that I would change if I were writing this script: 1) Global On Error Resume Next - I avoid using this if at all possible. It tends to mask errors that I need to know about to know when there is a problem with a script and what the problem is. I use it to specifically cover a single statement that I expect to have errors, but as I said I avoid using it globally. 2) This construct: While strUser="" strUser=wn.UserName Wend Has the potential to produce an infinite loop. Have there been specific situations where the WScript.Network object was unable to get the username but did get it if you tried repeatedly? I have never seen behavior like that. 3) Constant Names - By convention, constants are generally named with all caps to distinguish them as constants. It is not a hard and fas rule but most people follow the convention. 4) Function Names - While 'Run' is not a reserved keyword, it is a method of a WSH builtin object so that using it as a function name could be considered a little ambiguous.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|