Ai Squared App Central - Interactive VBScript 1.1 by Jamal Mazrui
Interactive VBScript 1.1
by Jamal Mazrui
Press Shift-Windows-I to invoke Interactive VBScript (abbreviated InVbs): a console mode environment for evaluating VBScript code and exploring the Window-Eyes API, as well as other COM object models. This is intended as another resource for learning scripting by entering pieces of code and getting immediate feedback. The prompt is a greater than sign (>). Type a VB statement to be executed, followed by Enter. To evaluate code as an expression instead, prefix it with the word 'print' or the question mark symbol (?). InVbs tries to output a useful result for any code entered, so the question mark is usually not necessary unless the code could be interpreted as either a statement or expression (e.g., x = y could be a statement assigning y to x, or an expression testing whether x and y are equal). To execute more than one statement in a batch (e.g., statements in a 'For' loop), seperate them with the colon symbol (:). To repeat a previous command, you can up arrow to it and press Enter.
You probably want all punctuation to be read so that Window-Eyes automatically reads the prompt for input (the Toggle Punctuation script makes this setting convenient). If output is more than 60 characters, word wrapping occurs. If it is more than 20 lines, you are prompted with the following prompt:
Type y and Enter, or just Enter, for the next screen of text. Enter n to stop output and return to the input prompt. Enter a for all output, which scrolls without stopping. This may be useful if you are logging a session to a file.
The log and other commands are explained below. They should be entered in lower case at the beginning of the input area. This syntax enables them to be distinguished from other possible code that starts with the same letters, since it can be typed with a leading space or diffrent capitalization if necessary. Many commands have a parameter that should be seperated by a space and typed without surrounding quotes. Some commands may be abbreviated with a symbol. Besides VBScript syntax, the following built-in commands are available:
cd Directory = change directory. If Directory is not specified, output the current directory. The default is the user profile folder.
cls = clear the screen.
cmd Command = pass Command to the Windows command interpreter, cmd.exe, and output the result. If Command is not specified, a Windows command prompt is opened. Abbreviate with the / symbol.
dir Object = list members of a COM object, including methods, properties, and events.
edit File = open File in the Window-Eyes script editor (Notepad by default, but configurable in the advanced settings of Script Manager). Abbreviate with @ symbol.
exec File = execute a VBScript file in the current context.
help = output this documentation.
log File = start logging a session to File. A ew text file is created that records subsequent input and output.
log off = stop logging.
print Code = output the result of evaluating code as an expression. Abbreviate with ? symbol.
quit or exit = close the console environment.
run Command = run Command as if entered in the Windows Start/Run dialog. Abbreviate with ! symbol.
start File = launch File as a Window-Eyes script. Abbreviate with
InteractiveVBScript.vbs is a global script hosted internally by Window-Eyes. It runs InVbs.vbs, which is hosted by the console version of the Windows Script Host, CScript.exe. Since the console environment is hosted by a seperate process, code that references Window-Eyes objects needs to include a reference to the Window-Eyes Application object. The global variable 'we' is assigned for this. For example, you can refer to the Keyboard object as we.Keyboard.
Another global variable is 'st' for the SayTools object that the script also uses. This free COM server is available at
If the script does not find it installed, it offers to download it. Homer Shared Object is also available as the 'hr' variable.
An array of input lines is maintained in the global variable called 'Inputs', e.g., Inputs(0) stores the first command entered, and Inputs(UBound(Inputs)) stores the last. Similarly, the 'Outputs' array stores the output displayed after each input. The 'r' variable also stores the last result so it may be conveniently used as part of the next command. Finally, ActiveWindow and FocusedWindow refer to the active and focused window objects that were present just before the console environment was opened.
Supported Languages: English
Minimum Version: Window-Eyes 7.0
12/15/2008 4:02:53 PM
Fixed deleting saysetup.exe after downloading and installing. Fixed getting Window-Eyes script editor for edit command.
Read more about Interactive VBScript
- Filename: InteractiveVBScript.wepm
- Date: 12/15/2008 4:02:53 PM
- Size: 101KB
- Total Downloads: 3636
DISCLAIMER: Ai Squared DOES NOT ASSUME AND IS NOT RESPONSIBLE FOR ANY LIABILITY WHATSOEVER FOR THE CONTENT OF THIS, OR ANY EXTERNAL, APP, THE OPERATION OR CONTENT (INCLUDING THE RIGHT TO DISPLAY SUCH INFORMATION) OF ANY APP, NOR FOR ANY OF THE INFORMATION, INTERPRETATION, COMMENTS OR OPINIONS EXPRESSED IN ANY APP. ANY COMMENTS OR INQUIRIES REGARDING THIS APP ARE TO BE DIRECTED TO THE PARTICULAR PERSON OR PERSONS RESPONSIBLE FOR AUTHORING AND PROVIDING THE APP.
There are no comments for Interactive VBScript.
App Central Search
App Central Links
© 2018 Ai Squared - All Rights Reserved.
130 Taconic Business Park Rd, Manchester Center, VT 05255
Ph: 802-362-3612 • Fax: 802-362-1670
Hours: M-F, 9am-5pm, EDST