This document describes scripts to be used with the script manager tool, which is part of the screen reader JAWSFor Windows.
A different set is provided for JAWS version 2019 and earlyer. For JAWS 20 and later, you must be using script manager scripts version 20 or later.
These are a replacement for the scripts supplied by Freedom Scientific, which
are used to edit script source code.
In this document, not all hot keys are specifically listed. To learn the hot keys in use, after installing the scripts, focus in script manager, and press insert+h to see a complete list.
- Setting and returning to up to 5 line number based bookmarks
- Speaking comment text in a different voice, or skipping comment text altogether.
- HotKeys for skipping from an If, else, or while statement to the corresponding elif, EndIf, or EndWhile.
- Hot keys for managing indentation levels.
- Place the cursor on a function call, and jump directly to the body of the function, read the code,
and then return to the original calling point.
- Go to a script body by pressing the associated hotkey for the script.
- Support for analyzing the call stack, showing the route by which a function got called.
- Functions for collecting debug information, such as variable values into the virtual buffer
- HotKeys for collecting multiple phrases for pasting
For the complete set of script developer tools, it is recommended the you also install
JLS_Utilities.
Installation
- If you are using JAWS 2020 or later: download:
Scripts v20
- run the installer, or unzip the files.
- Focus in the script manager, and press insert+q. if JAWS says "script manager scripts, version xxx", then your installation is working correctly.
A Note To existing Users
If you are used to these scripts, you will notice a few minor changes in v20. Since Vispero already has some hot keys assigned for their scripts,
We changed ours to line up with there's. In particular, to go to the body of a function you now put the cursor on the function call, and press f12, rather than f9.
To return back to the calling point, use control+f12, instead of control+f9 as before.
You will now notice that the script manager has a new editor under the hood, and it behaves a little differently.
Unlike before, pressing the enter key by itself now takes you to the same indentation as the previous line. Previously, that would put you back at 0 indentation.
Also, if the current line is indented, the home key will alternate between the left margin, and the first non blank character in the line, similar to Text pad and some other commonly known
editors. We plan to add an optional sound for striking the left margin.
In general, the jaws 20 update caused lots of changes, and we will be addressing a few remaining issues in the next few months.
Managing Indentation
One thing that speech users often ignore, is indentation. However, having the left margin reflect the logical structure of the script is extremely valuable to sighted and braille users alike.
This means that lines for the body of an If statement, or a while, are indented from the statements themselves.
The enter key has been defined with various modifiers to allow a new line to be generated with an indentation level which is relative to the indentation of the current line. For example, type a line containing a while statement. At the end of the line, press alt+enter, which will make a new line, which is indented by one level from the current line.
The complete list is:
- Make a new line at the next indendation level = alt+enter
- Make a newline at the same indentation level = shift+enter,/li>
- Or at the next outer indentation level, such as wehn ready to type the EndWhile line, control+enter.
To learn the present indentation level for the current line, press windows+grauv. Double click to automatically announce changes in indentation level as you arrow up and down.
speak the current line number, press windows+1 on the numbers row.
Seeking an indentation decrease. If you use indentation in your formatting, you can use that information to help you escape out of a block of logic. For example, if your
cursor is inside the body of a While statement, and you want to move upward to exampel the while statement itself,
or perhaps you want to move past the rest of the body, down to the EnWhile statement,
you can use these keys to seek a negative change in the indendation level.
- Move upward until indentation decreses = control+windows+UpArrow.
- Move downward until indentation decreses = control+windows+DownArrow.
If that search fails, or takes you where you didn't want to go, press control+shift+upArrow to return to the starting point.
Navigating Logical Blocks
This is a very useful feature for reading and analyzing script code, because you can easily skip past
blocks of logic that don't concern you. Place the cursor on an If statement, and pres a hot key to skip down to the corresponding elif, else, or Endif, whichever comes first.
This also works in reverse, such as when on an elif, to go up to the previous elif, or the original If statement.
It Also works for While EndWhile, or for, EndFor blocks.
- Search downward for matching logical keyword, pres control+downArrow. cursor must be on a line iwth If, For, Elif, or While.
- search upward for matching logical keyword, press control+UpArrow. Cursor must be on Endif, endWhile, EndFor, Else or Elif.
- Return to point before search, in case it does not work correctlyu, press windows+UpArrow.
Commented Text
Comment text is any line that starts with a semicolon.
Or, you can comment a block of lines by typing "/*" without the quotes to start the comment, and "*/" to end the comment.
The latter form is useful for telling the compiler to skip a large block of lines.
If desired, these scripts will automatically speak comment text in the JAWS message voice. If you configure the message voice to be unique, you can easily identify a comment.
The follwing comment-related hot keys are provided:
- While in a comment bloc, move down until the next non-comment line = windows+downArrow>
- While in a comment bloc, move up until the next non-comment line = windows+UpArrow>
- To toggle automatic comment skipping mode, press windows+NumPad5. When enabled, this function will automatically move past comment lines when using up and down arrow.
- Toggle whether or not to speak comment text in the message voice, press alt+grauv.
- If the comment voice becomes active when it should nto be, press alt+grauv to exit comment mode. this can occur if you pageup or pagedown out of a comment block, so the scritps do not detect the transition. Likewise
if you control+tab to a different script file, when the first file was located inside a comment.
Bookmarks
Bookmarks are implemented by recording the line number, and returning to it on demand. this
means that bookmarks will become out of date as you edit text, inserting or deleting lines above the bookmark.
Four separate bookmarks are provided.
To record a bookmark, press alt plus a number 1 to 4 on the numbers row.
To return to a bookmark, press control plus 1 to 4 on the numbers row.
The status bar in the view menu must be enabled for these to work correctly.
Accessing A Function
Often, you are reding script code, and seea function call, and wonder what that function does.
Place the cursor on the name of the function at the point where it is called, and press f9.
Focus will move to the body of the function, if it is located in the current jss file.
To return to the calling point, press control+f9.
This is done through the use of a line number based bookmark. Therefore,
inserting or deleting lines of code may invalidate the return bookmark.
To hear the documentation for a function, place the cursor on a call to that function, and press alt+f9.
Finding a Constant Or Message Definition
Place the cursor on a message name in the jss file, and press control+shift+m to search through all references .jsm files to find the message.
Or, to find the definition for a constant, place the cursor on the first character ofa constant name, and press control+shift+c.
Finding a script by HotKey
This is a process of pressing a hot key which is a ssigned to some script in the current jss file, and being taken to the code for thtat script.
the first question is which key map to search. By default, the JKM file for the current jss file is searched.
to specify a different jkm file, press control+f5, and type in the name of the desired jkm file, including the .JKM extension.
To search for the script, press f5. A periodic beeping will occur as long as the scritps are soliciting a hot key from you. Press the hot key of the script you are seeking, or press escape to cancel. If a matching script is found, focus will be moved to the first line of the script.
Debugging A Script
This functionality depends on related logic in the jls_utilities set. So, JLS_Utilities must also be installed in order to make full use of this.
The jls_debug module provides a set of test functions that you can call to post the values of variables. Call these functions from points in your script code where you want to examine the value of a variable.
Because JLS_Utilities is part of the default scritps, it's functions are available to all applications.
The script manager scripts provide hotkeys that you can use to insert the necessary test function calls. Place the cursor on a blank line, and press one of the following:
- post a literal string, press f6, and type in the strong to post.
- Post the value of a string variable, press f7, and type in the name of the variable, or paste from the clipboard.
- Post the value of aninteger variable, press f8, and type in the name of the variable, or paste from the clipboard.
After you press enter, the line containing the test function call is formulated, and inserted into your script. the line contains a special comment ;@@@ which you can use to search from such occurrences, in case you forget to remove them.
when this function call is executed, as you operate your application scripts, it adds an entry to a global string containing the name of the variable, and it's value.
To access the growing list of variable reports, use the jls_utilities hot keys. Such are provide that can:
- Enable or disable debug recording.
- Open the current debug history in the virtual viewer.
- Discard the current debug record, and start over.
Because the latter are actually JLS_Utilities keys, they can be performed while inside your application.
Collecting commonly Used Phrases
This mechanism lets you collect a list of words, or phrases from the text of your script file, and paste them elsewhere in the document. This is useful in cases such as the names of commonly used variables, where you don't want to keep typing them in, and dealing with the compilation errors that result when you mis type them.
Place the cursor on a word, or in the middle of selected text and press the key to capture. The word, or selection, will be added to the list of captured phrases.
To paste, place the cursor where you want the word or phrase to be inserted, press the hot key to open the list, and use arrow keys, or first letter navigation, to find the desired phrase in the list, and press enter to insert.
The complete list of functions supported is:
- Capture a word or phrase from the document, and place on the growing lsit.
- Type a literal string of text to be added to the list.
- Select a word or phrase from the list, to be inserted into the document
- Select a word or phrase to be removed from the list.
- Export the list to a file.
- Import a list from a file.
Inserting an Event Funcgtion
To declare a function in your script file which represents one of the jaws events, press control+ashift+e, and choose from the list of known events. After you press enter, the first line of the required function, including the list of parameters, will be placed in your script file. This is a shortcut for going into the default.jss file, and copying the line yourself, and is useful for establishing the correct interface to the event.
Naturally, we would love to hear from you. Send e-mail to:
TheSnowman@SnowManRadio.com.
Use your backspace key to browse the rest of the JAWS scripts offered by The SnowMan.
Back To The Snowman Main Page