Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.35 KB

README.md

File metadata and controls

40 lines (31 loc) · 1.35 KB

VBSH

Overview

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.

Features

  • Loop detection: loop statements trigger multiline support
  • Stop statement: to exit the script
  • Automatic detection of output value

Requirements

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.

Usage

Download and run it. For a greater deployment, move the script to a folder contained in the PATH environment variable.

Examples

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