[guispeak] Announcing Interactive JScript

  • From: Jamal Mazrui <empower@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx, program-l@xxxxxxxxxxxxx, guispeak@xxxxxxxxxxxxx
  • Date: Thu, 7 Feb 2008 07:13:39 -0500 (EST)

Now available at

Interactive JScript
Version 1.0
February 7, 2008
Copyright 2008 by Jamal Mazrui
Modified GPL License

I have wanted to build a JScript .NET interpreter.  I recently found an
article with code by Andrew Norris that got me started:

"A Simple JavaScript Command Line Interpreter for Windows in JScript.Net"
The original code has now been rewritten and extended considerably.

Interactive JScript (IJS) is a console mode environment that can
dynamically execute code in the JScript .NET language.  The source code is
in a single file, ijs.js.  a batch file, build.bat, calls the JScript
compiler, jsc.exe, which is distributed with the .NET Framework.  The
resulting executable, ijs.exe, is about 40K in size.  It may be run from
any directory on a computer that has the .NET Framework 2.0 (or above)

IJS may be used to run or test code in either standard JavaScript or the
enhanced Microsoft JScript 8.0, which also serves as the script language
for web development with ASP.NET.  The home page of the language is at

  For example, a .js file can define a sophisticated snippet that may be
invoked with the Alt+V command of the EdSharp editor, available at

JScript code can also be evaluated by IronCOM, a COM server that provides
traditional Win32 applications with access to functionality of the .NET
Framework, available at

The HomerKit library for JAWS
 includes a function called JSEval that wraps a JScript call via IronCOM,
thereby enabling JAWS scripts to make .NET calls for functionality not
available in the native scripting language.

IJS may also be helpful for programming in .NET languages other than
JScript.  Built in commands are defined for inquiring about available
methods, properties, and events via reflection.  You can explore an object
model, test expressions, save working code, and then convert it to the
syntax of another .NET language.

Reflecting on a COM object requires that a DLL be registered on the
computer, described in the article
"Inspect COM Components Using the TypeLib Information Object"

Registering this DLL (included in the archive) may be done at a command
prompt as follows:
RegSvr32 TlbInf32.dll
Installing EdSharp does this automatically, and makes IJS conveniently
available with the Go to Environment command, Control+Shift+G.

IJS works well with a screen reader, since new output to the console is
automatically read.  Periodically, the cls command is useful for clearing
the screen and eliminating extra verbiage.  IJS may also be used as a
simple, speech-friendly calculator, since most algebraic, trigonometric,
and date calculations may be done with JScript.

Below is the online documentation, available by entering the help command
in Interactive JScript.  Questions, comments, or code contributions are


Type a JScript statement, followed by Enter
(a closing semicolon is not needed).
Use UpArrow to repeat a command.
 End a line of input with a space and underline ( _) to continue
a multiline block of code.
The prompt then changes from a > to _ character.

Most classes of the .NET Framework 2.0 may be used in expressions.
Variable types are inferred.
To ease typing, the following namespaces are imported
(there classes may be referenced without a namespace prefix):

In addition, the following built-in commands are available:
quit = end this program
cls = clear the screen
eval FileName = execute a JScript file
eval clipboard = execute JScript code on the clipboard
cmd = pass any statement to the Windows command interpreter (cmd.exe)
dos = execute a console-mode command and display its output
log FileName = log output to a file
log off = suspend logging
log on = continue logging
net Object = list members of a .NET object
constructors Object = list its constructors only
events Object = list its events only
fields Object = list its fields only
methods Object = list its methods only
properties Object = list its properties only
com Object = list members of a COM object
dir Object = directory of members of either a .NET or COM object

** To leave the list, click on the immediately-following link:-
** [mailto:guispeak-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** guispeak-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:guispeak-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** guispeak-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts:

  • » [guispeak] Announcing Interactive JScript