Interactive JScript 1.3
by Jamal MazruiPress Alt-Windows-I to open a program called Interactive JScript (IJS). A Window-Eyes script, InteractiveJScript.vbs, responds to this key by running the program, ijs.exe. If the program was already open, its window will be activated.
Interactive JScript is a console mode environment that can dynamically execute code in the JScript .NET language. This is a superset of the JScript language hosted by the Window-Eyes scripting engine. The home page of JScript .NET is at
http://msdn2.microsoft.com/en-us/library/72bd815a(VS.80).aspx
IJS requires the Microsoft .NET Framework 2.0 to be installed on your computer. There is a good chance that it is already there. If not, versions are available for almost any version of Windows at
http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en
IJS may be used to build snippets of code to be evaluated by IronCOM, a COM server library that provides Window-Eyes scripts with access to functionality of the .NET Framework. The IronCOM installer is available at
http://EmpowermentZone.com/comsetup.exe
IJS may also be used to query documentation of .NET types and COM objects, the latter requiring that a particular COM server be registered on the computer (tlbinf32.dll). This library is installed in the user profile folder and registered automatically by the Window-Eyes script the first time it is run.
IJS recognizes when Window-Eyes is active, and uses its API to speak messages directly. You may need to inform Window-Eyes of the type of caret present via the Control-Insert-C hotkey. One use of IJS is to test expressions that use the Window-Eyes object model during script development, similar to use of the Immediate Window script by GW Micro. IJS also lets you query what objects, properties, parameters, data types, and return values are available to scripts, regardless of language.
For example, at the IJS prompt, query the members of the Keyboard object like this:
> com we.Keyboard
resulting in the following output:
_Keyboard
_Application = Application
Dispatch = Parent
Keys = Keys
_Window = FilterActiveWindow
_Window = FilterActiveWindow
_Window = FilterFocusedWindow
_Window = FilterFocusedWindow
Process = FilterProcess
Process = FilterProcess
Boolean = KeyDescriberActive
Boolean = Down(Long index)
Boolean = Toggled(Long index)
Void = InsertKeyDown(Long index)
Void = InsertKeyUp(Long index)
Void = InsertKey(Long index, KeyModifiers mods)
_Key = Key(String keyName)
RegisteredKey = RegisterHotkey(Variant Key, Variant function, Optional Variant filterBy, Optional Variant Parameter, Optional Variant FirstPress)
RegisteredKey = RegisterCursorKey(Variant Key, Variant function, Optional Variant filterBy, Optional Variant Parameter)
_Key = Capture()
Void = WaitForAllKeysUp()
Void = InsertUnicodeKey(Long Key)
Another example is to query what objects and members contain the word synthesizer as a substring:
> lib we synthesizer
with this output:
NumberMode
nmSynthesizer = 2
_Application
Synthesizers = Synthesizers
BrowseModeLanguageVerbosity
Boolean = AutoSwitchSynthesizer
Boolean = AutoSwitchSynthesizer
Synthesizers
Synthesizers
_Synthesizer = Active
_Synthesizer = Item(Long index)
Synthesizer
Below is the online documentation of the IJS program, wich is available by entering the help command at its > prompt:
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):
Accessibility
Microsoft.VisualBasic
System
System.Collections
System.ComponentModel
System.Data
System.Diagnostics
System.Drawing
System.IO
System.Net
System.Reflection
System.Runtime.InteropServices
System.Text
System.Text.RegularExpressions
System.Web
System.Windows.Forms
System.Xml
In addition, several built-in commands and functions are available.
A command name is lower case, with a space before each argument,
and no quotes around it. A function name is lower camel case
(words after the first are capitalized).
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
pause on = pause output after the screen fills (default)
pause off = continue output after the screen fills
log on = continue logging
net Type = list members of .NET Type
constructors Type = list its constructors only
events Type = list its events only
fields Type = list its fields only
methods Type = list its methods only
properties Type = list its properties only
com Object Match = list members of COM Object, optionally matching a substring
objects Object Match = list objects in its library, optionally matching a substring
lib Object Match = list objects and members in its library, optionally matching a substring
dir Type/Object = directory of members of either .NET Type or COM Object
doc Type = documentation for constructors of .NET Type
doc Type Member = documentation for Member of .NET Type
comCreate(sProgID) = alias for new ActiveXObject(sProgID)
output(Object) = alias for Console.WriteLine(Object)
If Window-Eyes is running, its Application object is
automatically assigned to the we variable for typing convenience.
This global script requires GW Toolkit.

Download NowSupported Languages: English
Minimum Version: Window-Eyes 7.0
File Details:
- Filename: InteractiveJScript.wepm
- Date: 11/13/2008 2:57:32 PM
- Size: 93.5KB
- Total Downloads: 1869
DISCLAIMER: GW MICRO 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.
Comments
There are no comments for Interactive JScript.




