 |
ExeScript |
 |
How To |
 |
VBS Files |
|
|
Tips for Writing VBS Files
- It is possible to replace the combination of the statements
Chr(13) + Chr(10) with the constant vbCrLf.
- If you want to display several strings in a MsgBox and each
string on a new line, you should insert the constant vbCrLf
between these strings:
MsgBox "123" + vbCrLf + "123" + vbCrLf + "123" + vbCrLf + "123"
- If code does not fit into one line, you can use the line
continuation character:
if a=1 and b=2 or c=3 then alert a
can be written like this
if a=1 _
and b=2 _
or c=3 _
then alert a
- To "glue" two numeric variables, it is better to use the
"&" character than "+", i.e.
a="Hel" b="lo"
then
a&b="Hello"
See also:
VBS File Examples
Copyright © ScriptCode.com 2010. All rights reserved.
|