Chapter 2
JAWS MACRO EDITOR
(Also contained in the disk file "T2M-EDIT.MAN".)
 
 
 
 
 
 
CONTENTS OF CHAPTER 2
 
      1.     CHAPTER INTRODUCTION . . . . . . . . . . . . . . . .  11
      2.     WHAT IS A MACRO? . . . . . . . . . . . . . . . . . .  11
      3.     STRUCTURE OF A JAWS MACRO. . . . . . . . . . . . . .  13
      4.     TYPES OF MACRO FILES . . . . . . . . . . . . . . . .  15
      5.     USING THE MACRO EDITOR . . . . . . . . . . . . . . .  16
      6.     MACRO EDITOR MENU BAR. . . . . . . . . . . . . . . .  17
             6.1   Files Menu . . . . . . . . . . . . . . . . . .  17
                   New. . . . . . . . . . . . . . . . . . . . . .  17
                   Open . . . . . . . . . . . . . . . . . . . . .  17
                   Save . . . . . . . . . . . . . . . . . . . . .  18
                   Save As. . . . . . . . . . . . . . . . . . . .  18
                   Save without Compile . . . . . . . . . . . . .  18
                   Print. . . . . . . . . . . . . . . . . . . . .  18
                   Print Preview. . . . . . . . . . . . . . . . .  19
                   Page Setup . . . . . . . . . . . . . . . . . .  19
                   Print Setup. . . . . . . . . . . . . . . . . .  19
                   List of Most Recently Used Files . . . . . . .  19
                   Exit . . . . . . . . . . . . . . . . . . . . .  19
             6.2   Edit Menu. . . . . . . . . . . . . . . . . . .  20
                   Undo . . . . . . . . . . . . . . . . . . . . .  20
                   Cut. . . . . . . . . . . . . . . . . . . . . .  20
                   Copy . . . . . . . . . . . . . . . . . . . . .  20
                   Paste. . . . . . . . . . . . . . . . . . . . .  21
                   Delete . . . . . . . . . . . . . . . . . . . .  21
                   Find . . . . . . . . . . . . . . . . . . . . .  21
                   Find Next. . . . . . . . . . . . . . . . . . .  21
                   Replace. . . . . . . . . . . . . . . . . . . .  22
                   Select All . . . . . . . . . . . . . . . . . .  22
                   Word Wrap. . . . . . . . . . . . . . . . . . .  22
             6.3   Macro Menu . . . . . . . . . . . . . . . . . .  23
                   Add Macro. . . . . . . . . . . . . . . . . . .  23
                   Insert Function. . . . . . . . . . . . . . . .  23
                   Compile Macro. . . . . . . . . . . . . . . . .  24
                   Next Macro . . . . . . . . . . . . . . . . . .  24
                   Previous Macro . . . . . . . . . . . . . . . .  24
                   Go To Line . . . . . . . . . . . . . . . . . .  24
             6.4   View Menu. . . . . . . . . . . . . . . . . . .  24
                   Tool Bar . . . . . . . . . . . . . . . . . . .  24
                   Status Bar . . . . . . . . . . . . . . . . . .  25
                   Set Tab Stops. . . . . . . . . . . . . . . . .  25
                   Set Fonts. . . . . . . . . . . . . . . . . . .  25
                   Set Printer Fonts. . . . . . . . . . . . . . .  25
                   Mirror Display Font. . . . . . . . . . . . . .  26
             6.5   Window Menu. . . . . . . . . . . . . . . . . .  26
                   Cascade. . . . . . . . . . . . . . . . . . . .  26
                   Tile . . . . . . . . . . . . . . . . . . . . .  27
                   Arrange Icons. . . . . . . . . . . . . . . . .  27
                   List of Open Documents . . . . . . . . . . . .  27
             6.6   Help Menu. . . . . . . . . . . . . . . . . . .  28
                   Contents . . . . . . . . . . . . . . . . . . .  28
                   How to Use Help. . . . . . . . . . . . . . . .  28
                   About The Macro Editor . . . . . . . . . . . .  28
      7.     USING THE INSERT FUNCTION DIALOG . . . . . . . . . .  29
      8.     DEVELOPING NEW MACROS. . . . . . . . . . . . . . . .  32
1.    CHAPTER INTRODUCTION 
 
      This chapter describes the use of JAWS macros and the JAWS
Macro Editor.  It explains how to create macros and offers general
suggestions for developing new macros.  Chapter 3 describes the specific
activities that can be performed by a JAWS macro.
 
 
2.    WHAT IS A MACRO?
 
      Before talking about how to use the Macro Editor and macros, it
is important to understand the term "macro".  A Macro is simply a
sequence of actions that are grouped together into a single operation. 
Macros are created to save time by making computer use more efficient. 
Macros automate tasks that you can do manually.  For example, a
macro can reduce thirty key strokes into one key stroke.  A macro can
enter key strokes, activate functions, and even make simple decisions.
 
      The concept of a macro can be demonstrated by looking at a
common human activity.  The human "tooth brush" macro is performed
every morning by millions of people and contains concepts that are quite
similar to those used in computer macros.  The toothbrush macro begins
as you start to look for your tooth brush, and then continues through the
following steps. 
 
a.    Pick up toothbrush.
 
b.    Pick up toothpaste.
 
c.    Remove the cap from the toothpaste tube.
 
d.    Squeeze toothpaste tube and deposit toothpaste on toothbrush.
 
e.    Replace the cap on the toothpaste tube and set the tube down.
 
f.    Brush teeth, as instructed by your dentist.
 
g.    After completing the brushing sequence, rinse mouth and
      toothbrush with water.
 
h.    Place toothbrush back in its proper location.
 
      You can think of each of the above steps as a set of individual
activities, or you can consider them to be one activity, i.e., brushing your
teeth.  If you put the individual steps together and give them a name,
then you are doing the same thing that is done when you create a
macro.  The toothbrush macro is also like a computer macro in one
additional way.  Most of the time, when you perform the toothbrush
macro, you do so without thinking about the steps.  Similarly, when you
use a computer macro you don't have to give much thought to the steps
that are being performed, you just need to think about what the macro
can do for you.
 
      A macro can be divided into two parts:  the "macro name" and the
"macro routine".  The Macro Name can either be a combination of keys
such as {ALT+UP ARROW} or a descriptive phrase such as "TextEvent". 
A macro name can be thought of as a label that is used to identify the
macro.  The Macro Routine is the various key strokes and actions that
are to be performed by the macro.  The macro routine is the work that
is done by the macro.  We may, from time to time, simply use the term
"macro" in a general way to refer to both the macro name and its
routine.
 
      Almost any key on your keyboard or combination of keys can be
used for a macro key.  The letter keys, number keys, punctuation keys,
cursor keys, and function keys can be used as macro keys.  You also can
use these same keys in combination with the {CONTROL}, {SHIFT},
{ALT}, and {INSERT} to create multiple macros for the same keys of the
keyboard.  Additionally, You can combine {SHIFT}, {ALT}, {CONTROL},
and {INSERT} with one another.  For example, you can use
{ALT+INSERT+LEFT ARROW} as a macro key.
 
      Many of the keys that make JAWS speak as you use Windows are
either macros that are connected to specific combinations of keys, or are
macros that are automatically activated in response to certain events
taking place on the desktop.  This means the keys used to perform the
functions of the standard keyboard layout can be changed.  It is even
possible to create a completely different keyboard layout to meet your
specific needs.
 
 
3.    STRUCTURE OF A JAWS MACRO
 
      When you create or edit a macro, you are working with text.  The
JAWS Macro Editor converts the text into binary computer files when
you save your macro file.  The following example shows the proper
Structure of a JAWS Macro.  The text is displayed in the same way
as it would appear in the JAWS Macro Editor.  Please note; text in a
macro can be either uppercase or lowercase.
 
# This macro is used when the PAGE DOWN key is pressed 
MacroBegin
{Page Down}
SayString("page down")
JAWSPageDown()
MacroEnd
 
      Macros make sense when they are broken down into their
component parts.  To understand this macro, you need to understand
the purpose and function of each part of the macro.  Each line of the
macro is described below. 
 
Line 1:
# This is for the PAGE DOWN key of the speech pad
      Any line in a macro file that begins with a "#" (number sign) or
      a ";" (semicolon) is a Remark Line. It contains information that
      helps to explain the purpose or use of the macro and is provided
      as a convenience to those who are editing the macro file.  The
      remark line at the beginning of this macro explains the purpose
      of this macro.  These optional remark statements can also be
      placed at the end of a line of text.  All text that appears after a
      "#" or ";" is ignored when the macro is used.  Regardless of
      whether a remark line is used, a blank line should always be
      used to separate macros from one another.  Thus, a blank line
      should precede this first line of the macro.
 
Line 2:
MacroBegin
      This line indicates the actual Beginning Point of the Macro. 
      It is required in every macro.
 
Line 3:
{Page Down}
      This line identifies the Macro Name.  The name of the macro
      must be surrounded by braces "{  }" as is shown here.  A macro
      name such as {INSERT+CONTROL+PAGE DOWN} could also be
      used.  This macro name means that you must hold down both the
      {INSERT} and the {CONTROL} before pressing the {PAGE
      DOWN}.  You could also use a macro event as the macro name. 
      Event macros are executed automatically when certain conditions
      occur on the desktop.  Lines 2 and 3 are often combined on the
      same line.  For example, "MacroBegin {PAGE DOWN}".  Chapter
      3 in this manual lists macro keys and event macro names that
      can be used in your macros.
 
Line 4:
SayString("page down")
      The expression "SayString" is a Macro Function.  This specific
      macro function sends a string of text to the speech synthesizer so
      it can be spoken.  Macro functions must be followed by a pair of
      parentheses "(  )".  The parentheses indicate the place where a
      Parameter is to be specified.  In many cases, a parameter is not
      required, however, the parentheses must always be included after
      the macro function.  In this specific case the text string must also
      be enclosed by quotation marks since this is text that is to be
      spoken.
 
Line 5:
JAWSPageDown()
      This JAWS macro function initiates the page down command. 
      This is not a standard {PAGE DOWN} function.  It performs
      different activities depending on the cursor that is in use.  When
      the JAWS cursor is active, this function moves the JAWS cursor
      to the bottom of the active window.  When the PC cursor is
      active, it sends a standard page down command to the Windows
      application. 
 
Line 6:
MacroEnd
      This required line indicates the Ending Point of the Macro. 
      This line should be followed by a blank line to separate it from
      the next macro.
 
      The concept of macros is universal.  Many software programs
have a facility for creating macros, however, their potential uses are not
identical.  For example, a JAWS macro can read the title of a window
or announce the status of a check box in a dialog, but a WordPerfect
macro cannot perform these functions.  A JAWS macro, however, could
be used to execute most any function of Microsoft Word, WordPerfect,
or most any other application software program.  JAWS macros actually
offer greater versatility than other types of macros, because they can
blend screen reading functions with application software functions to
create powerful tools.
 
 
4.    TYPES OF MACRO FILES
 
      When you edit macros, you are working with a specific type of
text file called a JAWS Macro Source File.  These files have the file
name extension of ".JMS".  When you use the macro editor to save a file
with the extension of ".JMS", it saves the text file and automatically
compiles it into the binary file that is use by JAWS.  These JAWS
Macro Binary files have filename extensions of ".JMB".  If you use the
macro editor with files that do not have the filename extension of
".JMS", then the files are not compiled when they are saved.  You can
use any text editor to edit a ".JMS" file, however the macros can only be
converted into a ".JMB" file by the JAWS macro editor.
 
      The file "DEFAULT.JMS" is the Default JAWS Macro Source
file that is compiled by the macro editor to create "DEFAULT.JMB". 
The "DEFAULT.JMB" is always in use regardless of the Windows
application you are using.  Other application ".JMB" files are
automatically loaded when you start specific Windows applications.  
 
      Application ".JMB" files are used concurrently with the
"DEFAULT.JMB" file.  When you press a key on your keyboard, JAWS
first looks through the application ".JMB" file (if there is one) to find a
matching macro name. If the macro name is not present, then JAWS
looks in the "DEFAULT.JMB" file.  If a macro is not present in the
"DEFAULT.JMB" macro file, then JAWS passes the key stroke to the
Windows application for processing.
 
 
5.    USING THE MACRO EDITOR
 
      The JAWS Macro Editor is a full function Windows text editor. 
It is used to create new macros or to modify the functioning of existing
macros.  Use the following steps when creating or editing macros.
 
a.    Switch to the JAWS application window with {ALT+TAB} or by
      using the Windows Task Manager.
 
b.    Press the Macro Editor Hot Key {CONTROL+M} to start the
      Macro Editor, or choose Macro Editor from the JAWS Utilities
      menu.
 
c.    At this point the edit field is empty and you can begin writing
      macros.  If you wish to edit an existing macro file, then use the
      Open Files dialog of the Files menu.  This dialog is a standard
      Windows Open File dialog.  The dialog displays all files in the
      \JFW\SETTINGS\ENU subdirectory that have the filename
      extension of ".JMS".  These files are JAWS macro source files. 
      Use your {TAB} to move to the list of filenames and choose the
      file you wish to edit.
 
 
6.    MACRO EDITOR MENU BAR
 
      The Macro Editor Menu Bar uses a standard Windows Menu
bar structure.  Its menus and dialogs use standard Menu bar keys.
 
6.1   Files Menu
 
      The menu items in the files menu are very similar to those in
other Windows applications.  Menu items are used to open, save, print,
and close files.
 
New
      This item opens an empty document window.  Other documents
      that you have been using remain open in their own document
      windows.  To rotate between open document windows, use
      {CONTROL+TAB} or choose the name of an open document from
      the list of document windows in the Window menu of the Macro
      Editor.
 
Open
      Opens a file that is stored on a disk.  A standard Windows dialog
      box for opening files is displayed.  You can change the active disk
      drive, directory, and determine which types of files are to be
      displayed.  Either choose a file from the list box, or type the name
      of a file in the edit window.
 
      Tip!  When you first open the Open File dialog, your cursor is in
      the File Name Edit box where you can type the name of a file.  If
      you wish, you can press {TAB} to move to the File List box where
      you can choose from a list of filenames.  The list of files will all
      have ".JMS" filename extensions unless you choose "All Files" in
      the combo box for file type.
 
Save
      This menu item is used to save the macro file that is in the active
      document window.  The filename is displayed on the title line of
      the window.  If the document has been previously saved, then it
      will be saved again using the filename from the title line, and a
      binary file with the filename extension ".JMB" will either be
      created or updated.  The hot key for saving and compiling the
      active document is "CONTROL+S".
 
      Please note!  If an error is found in the macro file, then it will not
      be compiled.  This prevents the default files from being used
      when they contain errors.
 
Save As
      This menu item is used to save the document that is in the active
      document window under a different filename than the current
      name.  The document is not compiled even when it has a ".JMS"
      filename extension.
 
Save without Compile
      This menu item is most often used when you want to save a file
      with a ".JMS" filename extension, and the file should not be
      compiled because it is an "include" macro file.  "Include" macro
      files are linked to other macro files and are combined with those
      files when they are compiled.  Error checking occurs at the time
      the "include" file is incorporated within the other macro file
      during compilation.
 
Print
      This menu item is used to print a copy of the document in the
      active document window.  It activates a standard Windows Print
      dialog box.  If you want to print all pages in your document and
      do not have specific requirements for printer selection, print
      quality, etc., then you can use the print hot key {CONTROL+P}
      and {ENTER} to activate the Print dialog and to start printing.
 
Print Preview
This menu item is used to display an image of how the printed page will
look when it is printed.  Use the buttons to move between pages and to
zoom in or out on the current page.  Press {ALT+F4} to return to the
document window of the Macro Editor.
 
Page Setup
      This menu item is used to set up headers and footers that appear
      when the document is printed.  The filename is automatically
      printed at the top of each printed page and a page number at the
      bottom unless you alter the information in this dialog box.
 
Print Setup
      This menu item is used to select printers and to manage the way
      your printer functions.  Dialog options allow you to choose
      between portrait and landscape printing, specify a paper tray,
      and set up other related settings.
 
List of Most Recently Used Files
      A list of the last four files that have been used with the Macro
      Editor is displayed in the Files menu.  Each time you open a file
      or save a new file, the filename is added to the top of the filename
      list.  If you frequently edit the same macro file, then you may find
      it desirable to open the file by choosing its name from this list. 
      The filenames in the list are numbered and you can quickly open
      a file on the list by activating the Files menu and typing its
      number, or by moving the selection cursor to the filename and
      pressing {ENTER}.  This list is different than the list that
      appears in the Windows menu.  The list in the Windows menu
      contains the names of document windows and document icons,
      and is used to switch between document windows.  The list in the
      Files menu is used to open frequently used files.
 
Exit
      This menu item is used to terminate your use of the Macro
      Editor.  If you have open files that need to be saved, then you will
      be prompted to save your work before you can quit using the
      Macro Editor.
 
6.2   Edit Menu
 
      The menu items in the Edit menu are standard Windows editing
functions.  Menu items are used to move, delete, and search for text.
 
Undo
      This menu item is used to restore the last editing action.  It
      restores the last text that was deleted, removes the last text that
      was copied into the document, etc.  The hot key for undo is
      {CONTROL+Z}.
 
Cut
      This menu item removes selected text from the document.  You
      must first use the standard Windows text selection keys to select
      the text you intend to cut.  These keys are listed in a later section
      of this chapter.  When text is cut, it is placed on the Windows
      Clipboard and can be inserted in a new location by using the
      Paste command.  Each time the Cut command is used, it replaces
      the text that has been previously placed on the Clipboard.  The
      hot key for Cut is {CONTROL+X}.
 
Copy
      This menu item makes a copy of selected text.  You must first use
      the standard Windows text selection keys to select the text you
      intend to copy.  These keys are listed in a later section of this
      chapter.  When text is copied, it is placed on the Windows
      Clipboard and can be inserted in a new location by using the
      Paste command.  Each time the Copy command is used, it
      replaces the text that has been previously placed on the
      Clipboard.  The hot key for Copy is {CONTROL+C}.
 
Paste
      This menu item is used to insert text that was previously cut or
      copied to the Windows Clipboard.  Be sure your insertion point is
      at the exact location where you wish to have text inserted before
      you use the Paste command.  The hot key for the Paste command
      is {CONTROL+V}.
 
Delete
      This menu item is used to delete selected text from your
      document.  Text that is deleted from your document is not placed
      on the Clipboard, and cannot be restored with the Paste
      command.  Deleted text can only be recovered with the Undo
      command.  If you use other editing commands such as Cut or
      Copy after text has been deleted, then it cannot be recovered. 
      The hot key for the Delete command is {DELETE}.
 
Find
      This menu item is used to search for text in a document.  It
      displays a standard dialog for locating text.  Type the text you
      wish to find in the edit field and press {ENTER} to begin the
      search.  Searches normally begin at the insertion point and move
      downward through the document.  If you want the search to move
      upward through the document, then choose the Search Upward
      radio button in the dialog.  If you are searching for a specific
      combination of uppercase and lowercase letters, then check the
      Match Case box.  The hot key for the Find command is
      {CONTROL+F}.
 
Find Next
      This menu item repeats the search that was most recently done
      by the Find command.  The insertion point moves in the direction
      specified in the Find dialog box.  The hot key for the Find Next
      command is {F3}.  
 
Replace
      This menu item is used to search for text and to replace it with
      different text.  If, for example, you used an incorrect variable
      name in several macros and you want to correct all of the errors
      at once, then you could use the Replace command.  To use this
      command, just activate the Replace dialog box, type the text that
      you want to replace in the Find What edit field, and type the
      replacement text in the Replace With edit field. Next, choose one
      of the buttons to start the process.  The Find Next button moves
      the insertion point to the first occurrence of the text you might
      wish to replace.  Use the Replace button to substitute the
      replacement text, or press the Find Next button again to move on
      to the next occurrence of the text.  If you simply want to have all
      occurrences of the text to be replaced, then use the Replace All
      button.
 
Select All
      This menu item is used to select all text in the active document
      window.  Once the text has been selected, you can then use the
      Cut or Copy commands to place the text on the Clipboard, or use
      the Delete command to clear the document window.
 
Word Wrap
      This menu item determines the way in which long lines of text
      are displayed in document windows.  If the Word Wrap menu
      item is checked, then all of your text is visible in the document
      window regardless of the length of lines you type.  Excess text
      wraps down to fill space below the beginning point of the line.  If
      Word Wrap is not checked, then long lines of text will scroll
      beyond the right and left edges of the document window.  When
      Word Wrap is off, then it is easy to verify where a line of text
      begins.
 
 
6.3   Macro Menu
 
      The Macro Menu is specifically designed to speedup the process
of creating and editing macro files.  Menu items help you start macros,
properly construct macro functions, and move around within a macro
file.
 
Add Macro
      This menu item is used to begin a new macro.  Place the insertion
      point at the position in your file where you want the new macro
      to begin, then use the Macro Begin command.  The command
      places the word "MacroBegin" on the line and places the insertion
      point between a pair of braces "{ }".  The insertion point is
      properly positioned for you to type the name of the macro.  For
      information about naming macros, review the information
      presented in Section 3 of this chapter.  After typing the macro
      name, use your {DOWN ARROW} to move to a blank line.  The
      Add Macro command places a blank line after the "MacroBegin"
      statement and places the word "MacroEND" after the blank line
      to mark the ending point of the macro.  Every macro must have
      a MacroBegin and a MacroEnd statement.  All macro operators,
      variables, and macro functions must be placed between the
      beginning and ending statements of the macro.  The hot key for
      the Add Macro command is {CONTROL+A}.
 
Insert Function
      This menu item is used to place a macro function into a macro. 
      Before starting the Insert Function dialog, be sure your insertion
      point is located at the location in your file where you want the
      macro function to appear.  Macro functions should always be
      placed between a "MacroBegin" statement and a "MacroEnd"
      statement.  There can be many macro functions between these
      beginning and ending points for a macro.  Next use the Insert
      Function menu item or the {CONTROL+I} hot key to activate the
      Insert Function dialog box.  Section 7 in this chapter provides
      additional information about using this dialog.
 
Compile Macro
      This menu item is identical to the Save command that appears in
      the Files menu.  It saves and compiles the information in the
      active document window.  Files must have a ".JMS" filename
      extension in order to be compiled.  The hot key for the Compile
      Macro command is either {CONTROL+M} or {CONTROL+S}.
 
Next Macro
      This menu item is use to move down to the beginning of the next
      macro in the document window.  Its hotkey is {F2}.
 
Previous Macro
      This menu item is used to move up to the beginning of the
      previous macro in the document window.  Its hotkey is
      {SHIFT+F2}.
 
Go To Line
      This menu item is used when you want to jump to a specific line
      in your document.  After choosing the Go To command, type the
      line number in the edit field and press {ENTER}.  The hot key for
      the Go To command is {CONTROL+G}.
 
 
6.4   View Menu
 
      The View menu is used to set up the Macro Editor window. 
Settings determine whether certain tools will be displayed on the
desktop and how text will be displayed/printed.
 
Tool Bar
      When this menu item is checked, the Tool bar is displayed below
      the Menu bar.  The Tool bar contains a variety of buttons that
      can be clicked to activate menu functions.  All tasks that can be
      activated from the Tool bar also can be activated from within the
      Macro Editor menu.  To check or uncheck this menu item,
      activate the View menu, move the selection cursor to the Tool bar
      menu item and press {ENTER}.  Pressing {ENTER} changes the
      setting and exits the menu. 
 
Status Bar
      When this menu item is check, it causes a Status bar to be
      displayed at the bottom of the Macro Editor window.  The Status
      bar indicates the row and column location of the insertion point. 
      To check or uncheck this menu item, activate the View menu,
      move the selection cursor to the Status bar menu item and press
      {ENTER}.  Pressing {ENTER} changes the setting and exits the
      menu. 
 
Set Tab Stops
      This menu item is used to determine the distance between tab
      stops.  When you press {TAB} while working in a document
      window, your text moves over to the left a certain distance.  The
      distance is determined by the setting in the Tab Stops dialog.  To
      change the size of the tab stop, activate the View menu, choose
      the Tab Stops dialog, and change the number in the edit field. 
      The number you specify indicates the number of spaces that the
      insertion point will move each time you press {TAB}.
 
Set Fonts
      This menu item sets up the font that is used to display text in the
      document window of the Macro Editor.  The dialog contains two
      list boxes:  one for setting the font type and one for setting the
      font style.  An edit field is used to specify the font size.
 
Set Printer Fonts
      This menu item sets up the font that a printer will use when you
      print a document.  The dialog contains two list boxes:  one for
      setting the font type and one for setting the font style.  An edit
      field is used to specify the font size.  The Set Printer Fonts menu
      item in the View menu will have a check mark after it when you
      specify a font in this dialog that is different from the font in the
      Set Fonts dialog.
 
Mirror Display Font
      This menu item serves two purposes.  If a check mark appears
      after this menu item, then this means a font has not been
      specified in the Set Printer Fonts dialog.  As a result, the font
      that is used to display text is mirrored or reproduced whenever
      you print the text in the document window.  If you specify a font
      in the Set Printer Fonts dialog that is different from the font
      specified in the Set Fonts dialog, then the check mark is not
      shown after the Mirror Display Fonts menu item.  Instead, a
      check mark appears after the Set Printer Fonts menu item.  If
      different fonts are specified in these two dialogs, then you can
      cause the printer font to mirror the display font by choosing the
      Mirror Display Fonts menu item.  When the Mirror Display Fonts
      menu item is not checked and you press {ENTER} to choose it,
      then the check mark moves to this menu item and you return to
      the document window.  Please note -- the check mark can only be
      removed from the Mirror Display Fonts menu item by choosing
      a font in the Set Printer Fonts dialog.
 
6.5   Window Menu
 
      The menu items in the Window menu follow standard Windows
rules for their use.  The menu items determine how document windows
and icons are displayed within the Macro Editor window.
 
Cascade
      When this menu command is chosen, all open document windows
      are laid over the top of one another.  The active document window
      is placed on top of the stack and the titles of all other windows
      are displayed above the title for the active document.  When
      documents are displayed in this arrangement, there is more room
      on each line to display text because lines can stretch most of the
      way across the video display.
 
Tile
      When this menu command is chosen, all open document windows
      are displayed in a checkerboard or matrix arrangement.  The
      active document window is reduced to the size of one of the
      rectangles of the checkerboard.  When documents are displayed
      in this arrangement, some of the text from the various document
      windows is simultaneously visible.  Since each document only
      occupies a section of the desk top, each document window is
      small.  This means that lines of text will be short.  The tile
      arrangement is primarily of value to sighted PC users who can
      refer to information in inactive document windows as they edit
      text in the active window.
 
Arrange Icons
      This menu item is used to arrange icons along the bottom edge of
      the Macro Editor window.  When you minimize a document
      window, an icon is created.  If you minimize a large number of
      document windows, then the icons may not be neatly arranged on
      the desktop.  When you use this command, the icons are neatly
      placed along the bottom edge of the Macro Editor window.
 
List of Open Documents
      The names of open document windows are displayed at the
      bottom of the Window menu in a numbered list.  The list includes
      documents that are displayed on the desktop as well as those that
      are minimized as icons.  The information these document
      windows contain could have been newly created, recently saved,
      or could be unmodified copies of files stored on your hard disk
      drive.  This list is different from the list in the Files menu.  The
      list in the Files menu contains the filenames of the last four
      document files that have been opened or saved, and is primarily
      used to open frequently used files.  The list of document windows
      in the Window menu is used to switch between document
      windows.  The document window names are numbered and you
      can quickly switch to a window on the list by activating the
      Window menu and typing its number, or by moving the selection
      cursor to the window name and pressing {ENTER}.  You also can
      use the {CONTROL+TAB} and {CONTROL+SHIFT+TAB} to
      rotate through the entire list of document windows in the same
      way that the {ALT+TAB} and {ALT+SHIFT+TAB} are used to
      switch between application windows.
 
6.6   Help Menu
 
      The menu items in the Help menu provide quick access to
reference information about the Macro Editor.
 
Contents
      This menu item is used to activate the Macro Editor Help facility. 
      When it is used, the opening page of Macro Editor Help is
      displayed.  Use your {TAB} key to move through the list of topics. 
      Press {ENTER} to choose a topic.  Press {ALT+F4} to quit the
      help system and to return to the Macro Editor.
 
How to Use Help
      This menu item is used to display a summary of techniques and
      keyboard commands related to the use of the Microsoft Windows
      Help facility.  The information presented here was specifically
      designed for persons using screen reading software.  When you
      choose this menu item, an opening page of help related topics is
      displayed.  Use your {TAB} key to move through the topics.  Press
      {ENTER} to choose a topic.  Press {ALT+F4} to quit the help
      system and to return to the Macro Editor.
 
About The Macro Editor
      This menu item provides brief information about the Macro
      Editor version number.
 
 
7.    USING THE INSERT FUNCTION DIALOG
 
      The Insert Function Dialog is used within the Macro Editor to
place macro functions into a macro file.  To use the dialog, place your
insertion point at the location in the file where you want a macro
function to appear, and then choose the Insert Function from the Macro
menu or press the {CONTROL+I} hot key.  Macro functions must be
placed between a "MacroBegin" statement and a "MacroEnd" statement,
as discussed in Section 3 of this chapter.  There can be other macro
functions before or after the point where the macro function is to be
inserted.
 
      Once the Insert Function dialog has been activated, you can use
several keyboard commands to read specific information in the dialog. 
Use {INSERT+H} to listen to a list of keyboard commands for the dialog
or review the information in "MACROED.TXT located in the
\JFW\SETTINGS\ENU subdirectory.
 
      The Insert Function dialog box contains an edit field, a list box,
and several buttons.  When you first activate the dialog, the insertion
point is placed in an edit field where you can type the name of a macro
function.  If you know the name of the function you need, then you can
begin to type its name.  The adjacent list box scrolls automatically in
response to your typing, and displays the function name that most
closely matches the text you have typed.  Use your {BACKSPACE} and
{DELETE} to correct typing errors.
 
      If you don't know the name of the function you need or you just
can't find it by typing the beginning portion of the function name, then
use the {TAB} to move to the Function list.  Now you can use your {UP
ARROW} and {DOWN ARROW} to move through the alphabetized list. 
You can jump directly to a specific section of the list by typing the first
letter of the function you need.  Each time you press a new alphabet
key, the selection cursor jumps to the corresponding section of the list. 
Use the arrow keys as needed to move up and down through the list. 
A description of each function and its use is displayed in the dialog as
you move the selection cursor through the list of functions.  You can use
the {INSERT+D} to read the description of the current function at any
time.
 
      When you find the function that you need for your macro, then
press {ENTER} or click on the "Next button". If the function does not
require parameters, then the dialog inserts the text of the function in
your macro file and automatically returns to the document window.
 
      If the macro function requires one or more parameters, then your
insertion point is placed in another edit field when you press {ENTER}
or choose the Next button.  The prompt line indicates whether you are
to choose a macro function or to specify a parameter.  If you are to
specify a parameter, then the prompt also identifies the number of the
parameter you are specifying, i.e., parameter 1, 2, 3, etc.
 
      The parameters that you specify are usually going to be integers,
text strings, or window handles; however, variable names and Macro
functions also can be used.  The use of variables and macro functions as
parameters are allowed when they provide an integer, a text string or
a window handle for the macro function.
 
      If you plan to use a macro function as a parameter for another
macro function, then you must start the Function dialog again while the
dialog is still active.  This is done by using the {ALT+I} hot key or by
pressing the Insert Function button in the dialog box.  (The Insert
Function button only appears when the dialog displays an edit field for
entering a parameter.)  The new dialog box has a similar appearance to
the original Function dialog.  It has an edit field, list box, and several
buttons, however, the prompt line and title line are different, and the
list of macro functions is much shorter.  The title line of the dialog
indicates that you are preparing function 2, i.e., a secondary function to
the original function.  When you activated the dialog the first time, the
title line indicated that you were preparing function "1".  When you
activate the dialog again while it is still active, then the title line
displays a number "2" to indicate that the function you are entering is
one level down from the first function.
 
      The edit field and list box operate in the same way as they did
when you entered the original macro function.  The function list box
scrolls as you type text in the edit field, or you can move around in the
list box by using the alphabet keys and the arrow keys.  The list of
functions only includes those that can be used as parameters for the
specific macro function you are preparing.  Choose the desired macro
function and press {ENTER} or choose the Next button.  This once again
takes you to a dialog where you have the opportunity to specify a
parameter.  If this sounds confusing, it is because a parameter that is
a macro function also may need to have one or more parameters.  In
fact, you can go many levels deep as you specify functions to serve as
parameters for other functions.  In the following example, the
GetWindowType macro function uses the GetRealWindow function as its
parameter, and the GetRealWindow function uses the
GetCurrentWindow function as its parameter.  At this point, it is not
necessary to understand what these different functions are doing,
instead we are simply showing how functions can be used as
parameters.
 
GetWindowType(GetRealWindow(GetCurrentWindow()))
      (The GetCurrentWindow function determines which window is
      active.  The "handle" of the active window is then given to the
      GetRealWindow function which uses it to find an associated
      window that has a window title.  The window handle of the real
      window is then given to the GetWindowType function, which uses
      the handle to determine the "window type".
 
      The title line of the dialog keeps track of how many levels deep
you are within the macro when you are choosing a function to serve as
a parameter.  The prompt line always tells you what you need to do next
at that level.
 
      The Finish button can be used at any time to complete the macro
function and return to the edit window.  It can be used when you want
to manually add additional information to the macro and no longer want
to choose macro functions from the dialog.  The Back button can be used
when you are one or more levels deep within a macro function to
terminate the current activity or step in the process.  The Back button
does not discontinue your use of the dialog.  The Cancel button,
however, terminates the use of the Insert Function dialog and returns
you to the document window regardless of how many levels deep you are
within the macro.
 
 
8.    DEVELOPING NEW MACROS
 
      The best way to learn about the techniques that are used in
JAWS macro programming is to spend some time studying the macros
in existing JAWS macro source files.  The "DEFAULT. JMS" and
"DEF_INCL.JMS" files located in the \JFW\SETTINGS\ENU
subdirectory are a good beginning point for your study.  Read the
macros and follow the steps they contain from beginning to end.  If you
do not understand a macro function, then you can look it up in the next
chapter or you can review the file "FUNCTIONS.JML" located in
\JFW\SETTINGS\ENU.  This file contains the most up to date list of
macro functions being used in the JAWS Macro Language.
 
      Once you understand the purpose of the macro functions and you
understand how they can be put together to perform tasks, then the
next step is to study your application programs.  When you find a
situation where your productivity can be enhanced with a new macro,
then you need to analyze the activity.  You need to breakdown the
activity into its individual steps.  You need to answer the types of
questions presented below in order to create effective macros.
 
a.    What is the exact task you are trying to complete?  Be as specific
      as possible.
 
b.    What specific keys do you need to press and in what order must
      they be pressed to accomplish the specific task?
 
c.    Do you want JAWS to speak?  If so, then do you want JAWS to
      speak a string of text that is built into the macro or to read
      something from the desktop?
 
d.    If the macro must make a decision based on the status of your
      application program, then what information on the desktop can
      JAWS check in order to decide which response is appropriate?
 
      The preceding list of questions is not comprehensive, but it can
help point you in the proper direction.  A certain amount of creativity
is also helpful when creating macros.  Don't be afraid to try a new
macro.  If it doesn't work, then you can always remove it from the macro
file. 
 
