Tricks of VBScript


VBScript has been in use widely on every version of windows. It is said Bill Gates favor VBScript, which may be one of the reasons that it is shipped in almost every version of Windows.

With VBScript, daily jobs can be accomplished. The following three techniques are commonly used.

1. Run External Program the Run method using WScript.Shell object.

Set W = WScript.CreateObject("WScript.Shell")
W.Run("Notepad")
Set W = Nothing

2. Run Code: This is to execute code from a string, which can be used to emulate the include method (which includes the VBScript from another file).

ExecuteGlobal "msgbox Hello, World!"

3. Eval Code: Numeric values are computed from a string expression.

Msgbox Eval("1+2+3")

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
172 words
Last Post: A Quick Check If 32 or 64-bit OS
Next Post: Include External Files in VBScript/JScript (WSH)

The Permanent URL is: Tricks of VBScript

Leave a Reply