Customizing an Unknown Application
Many questions should be answered about a new application to determine what customization is necessary. Before you write your first script, you should determine how JAWS® works with the application without any customization.
The Main Application Window
The first place you should start your analysis is the main application window. Begin by activating the menu bar using the ALT key. Explore the main application window to determine if any of the controls can be accessed using TAB or SHIFT + TAB. Note any areas within the main application window that contain static text. You will also need to determine if any of the options in the menu or tool bars offer keyboard access. The following checklist gives you some initial areas to assess how well JAWS performs:
-
Do menu bars speak automatically when activated?
-
Do menu options speak automatically when the arrow keys are used to move from option to option?
-
Can all controls on the main application window be accessed?
-
Is there keyboard access to menu or toolbar items?
-
Are there areas of the screen that contain static text that provides useful information during application execution?
-
If there is static text within the main application window, can the user quickly locate the text?
-
Are the tool bars and other important graphics labeled?
-
What information should be shown on the Braille display for quick access?
The above list gives you suggestions for reviewing the main application window of a new and unknown application. You may find that there are other items to check that are not contained on the list.
Dialog Boxes
After reviewing the main application window, you should then check each of the dialog boxes contained within the application. When the dialog box first opens, does JAWS speak the name and active control automatically? Note whether or not the TAB and SHIFT + TAB keystrokes move the focus from control to control. You should also note any areas within each dialog box that contain static text. You can use the following check list to assess the amount of information spoken by JAWS within dialog boxes:
-
Does each text label speak?
-
Does JAWS announce control types correctly?
-
Can all controls be accessed while moving through the dialog box with TAB and SHIFT + TAB?
-
Is each control its own window?
-
Can static text contained within the dialog box be quickly located?
Application Structure and Windows Identifiers
After you have made an initial assessment of the application, you will need to look at information for each of the windows contained within. You can use the Script utilities to determine things such as parent-child relationships, control ID values, window classes and more. You should review the main application window and each subsequent dialog box in much the same way as before. However, you will need to note window identification information for each control or window. The following checklist can help you review the application using the Script utilities:
-
Are control ID's defined?
-
If the control ID's have been assigned, are they dynamic or constant?
-
Does each window have standard window classes?
-
Review the parent-child relationships in the main application window and each dialog box.
Beginning the Customization
After you have completed a thorough review of the application, you can now begin to think about how best to customize JAWS to work with it. If you found non-standard window classes, you should go back through the application and reassign each non-standard window class to a class that JAWS recognizes. Keep in mind that once you reassign a non-standard class, that reassignment is used for each occurrence of the non-standard window class throughout the application. Many times, reclassifying non-standard window classes significantly improves the ability of JAWS to read window information automatically using the default settings.
Before you create scripts to read areas of static text within any of the application windows, try creating frames around the text first. Creating frames around static text that is not contained within it's own window keeps from having to write scripts to access the information. You can then add frame events to monitor for changes within the boundaries of the frame and speak new text automatically when it appears. You can also attach a keystroke to the frame surrounding the text that will allow you to quickly read the information.
::: {#customizing-jaws-with-scripts}
Customizing JAWS with Scripts
:::
After you have tried frames and reclassifying non-standard window classes, you may find that you still need to create scripts for the application. Before you begin to look at the built-in functions used to create your scripts, there are a few things you should do.
Begin by using pseudo-code to list the steps your script should take to reach the desired outcome. Pseudo-code is nothing more than writing down the steps in short phrases that your script will need to complete the desired action. Write each step of the script down in a list. After you have written down the initial steps the script will need to execute, try to recreate those same steps with JAWS commands using the keyboard. You should also review the notes you made previously when you used the Script utilities. You may be able to take advantage of the relationships between parent and child windows to access information within the application.
After you have either tried recreating the steps using the keyboard or reviewed the program structure, note any additional steps you had to take that are not listed in your pseudo code. Now you can begin to look at the built-in functions you will need to use to create the script and achieve the desired outcome. You can follow this procedure for each script you need to write to customize JAWS to work with the application.
Passing Keystrokes and Typing Text with Scripts Exercises
The following exercises give you practice creating scripts that pass keystrokes, access menu options that do not have shortcut keys and type text into the active document window. These chapter exercises do not walk you through the steps needed to create the script. Instead, the goal of the script is shown first, the script documentation second and the code of the script third. If you need to review the steps used to create a script or add functions to the script, refer to chapters 1 through 9 for information on the steps needed to start the Script Manager and the use of the New Script dialog.
Creating a Pass-Through Script
The objective of this exercise is to create a pass-through script that takes an existing application keystroke and enhances its functionality. Within Internet Explorer, you can press, ALT + HOME, to move immediately to your HOME. page. When you press this keystroke, Internet Explorer does not indicate audibly that you are going back to your HOME. page. Create this script within the script file for Internet Explorer, Internet Explorer.jss. . Your script should begin by passing the ALT + HOME keystroke through to Internet Explorer. Before the script completes, JAWS should speak an informational message advising you that you are now going back to your HOME. page. After you have compiled the script, you can test the script by going to a Web page other than your HOME. page and pressing ALT + HOME. After you hear JAWS speak the informational message, your HOME. page should begin loading into Internet Explorer. If you find that your HOME. page is loaded into Internet Explorer, then you can confirm the action was successful.
Script Documentation:
-
Script Name: GoToHomePage
-
Attach to Key: Checked
-
Synopsis: Loads your home page.
-
Description: Passes ALT + HOME to Internet Explorer to load your home page and announces it.
-
Category: Keyboard
-
Assign To: ALT + HOME
Script GoToHomePage () TypeKey (\enquote{ALT + HOME}) SayFormattedMessage (OT_STATUS, \enquote{Go To HOME. page.}, cMsgSilent) EndScript
Additional Practice: Create a small suite of pass-through scripts for common browser actions (Back, Forward, Refresh, Focus Address Bar), each with a concise status message. How would you organize and document them to keep assignments discoverable?
You can add the messages JAWS speaks to a JAWS header or message file and then include that file within the script file for Internet Explorer. See 8.0 Creating and Speaking Messages for more information on creating JAWS message files and adding messages to the file. :::
Typing Text with a Script
The objective of this exercise is to create a script that types your e-mail signature in any active application window. You can use this script in your e-mail application, any text editor, or a word processor. You can use a series of TypeString functions to type the text of your signature. Between each call to the TypeString function, be sure to insert calls to the EnterKey function. After you have typed all the necessary text for your signature, JAWS should speak a message informing you the signature was added. Script Documentation:
-
Script Name: TypeSignature
-
Can be Attached to Key: Checked
-
Synopsis: Types an e-mail signature in any application.
-
Description: Types an e-mail signature in any application using the TypeString function.
-
Category: Keyboard
-
Assign To: CONTROL + SHIFT + W
Script TypeSignature ()
TypeString (\enquote{Training Department})
EnterKey ()
TypeString (\enquote{Freedom Scientific Inc.})
EnterKey ()
TypeString (\enquote{11800 31st CT. N})
EnterKey ()
TypeString (\enquote{St. Petersburg, FL 33716})
EnterKey ()
TypeString (\enquote{PH: (800) 444-4443})
EnterKey ()
TypeString (\enquote{FAX: (727) 471-7927})
EnterKey ()
TypeString (\enquote{training_info@FreedomScientific.com})
EnterKey ()
SayFormattedMessage (OT_STATUS, \enquote{Signature added})
EndScript
Additional Practice: Turn this signature into a reusable snippet system: prompt for recipient or context and insert different templates across editors (for example, Notepad, email, Word). How would you detect the host application and pick the right snippet?
:::