This script provides REPL features to VBScript commands in a Windows shell prompt. It uses the Execute
statement in order to evaluate the commands passed to the prompt.
- Loop detection: loop statements trigger multiline support
Stop
statement: to exit the script- Automatic detection of output value
For the time being, it only works with the console based WSH, CScript that is. This script has solely been tested on Windows 7. It should work fine for pretty much all popular Windows releases.
Download and run it. For a greater deployment, move the script to a folder contained in the PATH environment variable.
Printing "Hello world"
VBSH> "Hello world"
Hello world
Summing numbers from 0 to 3
VBSH> sum = 0
VBSH> For i = 0 To 3
... sum = sum + i
... Next
VBSH> sum
6
Starting an Excel application and making it shown
VBSH> Set oExcel = CreateObject("Excel.Application")
VBSH> oExcel.Visible = True