
JAWS MACRO OPERATORS AND MACRO FUNCTIONS
from JT on Wednesday, November 22, 1995

This file contains master documentation for functions
used in the JAWS Macro Programming Language.  It is
designed to serve as the primary resource from which
the FUNCTION.JML file, print manuals, and help files
are generated.

Proof reading for spelling, capitalization, and
punctuation errors is in process.  Proof reading for
the correctness of content is needed.  Please check
descriptions and examples for accuracy, and feel free
to suggest more appropriate examples. 

I suggest that several additions be made to the
FUNCTION.JML file.  The following functions should be
added to provide a complete list of functions that can
be used in the language.

Return
MacroBegin
MacroEnd
Then
Let
Var
String
Handle
Integer
Bool


I have removed macro functions from this file that
were marked "never called by the user" and those
labeled as "not yet implemented".  I felt these unused
functions did not provide information for the end user
and were a source of distraction.  There may be
reasons to retain these functions in the file, and I
invite feedback about keeping these functions.

:Function 22 PushInt
:Function 24 PushString
:Function 27 AssignStringVar
:Function 26 PushStringVar
:Function 28 PushIntVar
:Function 29 AssignIntVar
:Function 33 strcmp
:Function 32 ExecuteKey
:Function 50 ToggleDebug
:Function 52 GetDate
:Function 56 Flush
:Function 59 SetVoice
:Function 66 SayUnit
:Function 71 NextUnit
:Function 76 PriorUnit
:Function 137 HasFocusRect
:Function 138 SayFocusRect



## MACRO OPERATORS BEGIN HERE

:function 1 -
:description  The subtraction operator is used in
equations to indicate subtraction.

:Function 2 +
:description  The Addition operator is used in
equations to indicate addition.

:Function 3 *
:description The Multiplication operator is used in
equations to indicate multiplication.

:Function 4 /
:description  The Division operator is used in
equations to indicate division.

:Function 5 <
:description The Less Than operator is used in If-
Then-Else statements to compare two conditions.  It
asks the question; Is the first condition "less than"
the second condition? statements to determine whether
the first of two conditions is

:Function 6 <=
:description  The Less Than or Equal To operator is
used in If-Then-Else statements to compare two
conditions.  It asks the question; Is the first
condition "less than or equal to" the second
condition?

:Function 7 ==
:description  The Equals operator is used in If-Then-
Else statements to compare two conditions.  It asks
the question; Is the first condition "equal to" the
second condition?

:Function 8 >=
:description  The Greater Than or Equal To operator is
used in If-Then-Else statements to compare two
conditions.  It asks the question; Is the first
condition "greater to or equal to" the second
condition?

:Function 9 > 
:description  The Greater Than operator is used in If-
Then-Else statements to compare two conditions.  It
asks the question; Is the first condition "greater
than" the second condition?

:Function 10 !=
:description  The Not Equal To operator is used in If-
Then-Else statements to compare two conditions.  It
asks the question; Is the first condition "not equal
to" the second condition?

:Function 11 &&
:description  The And operator is used in If-Then-Else
statements to determine whether two conditions are
both true.  It asks the question; Is the first
condition true "and additionally" is the second
condition true?

:Function 12 ||
:description  The Or operator is used in If-Then-Else
statements to determine whether either of the two
conditions are true.  It asks the question; Is the
first condition true "or"  is the second condition
true?  It does not matter which condition is true.

:Function 14 If
:description The If operator marks the beginning of an
If-Then-Else statement.  A fully formulated statement
includes:  "If", "Then", "Else", and "EndIf".  The
macro functions that appear between the If and the
Then are used to evaluate whether a certain condition
is present.  For example, can a certain graphics
character be found in the active window?  Every
statement must include "If", "Then", and "EndIf".  The
"Else" is optional.

:Function 15 Else
:description The Else operator is an optional part of
an IF-Then-Else statement.  If-Then-Else statements
always ask  a question about whether something is true
or false, i.e., is a condition present or not present. 
When the condition is present (true), then the actions
that follow the "Then" will be performed.  When the
condition is not present (false), then the actions
that follow the "Else" are performed.  An If-Then-Else
statement must always include:  If, Then, and EndIf --
the Else is optional.

:Function 16 EndIf
:description The EndIf operator marks the end of an
If-Then-Else statement.  A fully formulated If-Then-
Else statement includes "If", "Then", "Else", and
"EndIf".  The "EndIf" is always required to terminate
the If-Then-Else statement.  If-Then-Else statements
also can be nested.  This means that one If-Then-Else
statement can be contain within another statement. 
Nested If-Then-Else statements can be placed between
"Then" and "Else" or between "Else" and "EndIf".

:Function 17 Not
:description  The Not operator reverses the question
asked by an If-Then-Else statement.  It is placed
immediately after the "If" in the If-Then-Else
statement.  It says, "If the specified condition is
not present, then perform the following actions."

:Function 18 While
:description  The While operator marks the beginning
of a "While Loop".  While Loops perform repeated
actions and save space.  The following example moves
the cursor up nine lines.
Let VariableName = 9
While (VariableName) 
PriorLine()
Let VariableName = VariableName - 1
EndWhile

:Function 19 EndWhile
:description  The EndWhile operator marks the end of
a "While Loop".  The macro functions that are to be
repeated must be placed between "While" and
"EndWhile".

:Function 20 For
:description  The For operator marks the beginning of
a "For Loop".  A For Loop performs one or more actions
a specified number of times.  They reduce the size of
macro files and often reduce processing time.  When
the value for "VariableName" equals zero, then the For
Loop terminates.
For VariableName 1 to 3
PreviousCharacter()
Next

:Function 21 Next
:description  The Next operator marks the end of a
"For Loop".  The macro functions that are to be
repeated must be placed on lines between "For" and
"Next".




### JAWS MACRO FUNCTIONS BEGIN HERE

:Function 51 Run
:description  The Run function is used to start a
software program.  The program name and its path must
be placed within quotation marks as shown in the
following example.  
Run("C:\TOOLBOX\PKZIP\PKUNZIP.EXE")
:param1 string  Type the name of the program you wish
to start.  You may need to include a path and filename
extension, and you must enclose the text in quotation
marks.  Quotation marks are required because this is
a text string.  Example:  "C:\TOOLBOX\FILENAME.EXE"

:Function 53 SayString
:description  The SayString function is used when you
want the speech synthesizer to speak a message.  The
text that is to be spoken must be placed within
quotation marks as shown in the example.  
SayString("the name was not found")
:param1 string  Type the text that is to be spoken,
type a variable name, or choose a macro function.  A
variable can supply a text string or you can use a
macro function to provide the string.  To display a
list of macro functions that can provide the required
string, choose the "Insert Function button" or press
{ALT+I}.  Be sure to enclose the text in quotation
marks as shown in this example.
"Your file was saved successfully"

:Function 54 Beep
:description  The Beep function makes the PC beep.  It
can be included within an If-Then-Else statement so
that when a certain event occurs, you will hear a
beep.  A Beep could be placed after "Else" in an If-
Then-Else statement so that, for example, when a
search for text fails, the macro beeps.  
If (Findstring(GetRealwindow(getcurrentwindow()),
"OK",0,0)) then
LeftMouseButton() ;click left mouse button
Else
Beep()
EndIf

:Function 55 MessageBox
:description  The MessageBox function causes a message
box to pop up on the desktop.  It can be included
within an If-Then-Else statement so that when a
certain event occurs, the needed message pops up.  A
MessageBox function could be placed after "Else" in an
If-Then-Else statement so that, for example, when a
search for text fails, the message box pops up. 
Example:  
If (DialogActive()) Then
SayControl(GetCurrentWindow)
Else
MessageBox("A dialog box is not active")
EndIf
:Param1 string  Type the text to be displayed in the
message box.  You must place quotation marks around
the text that is to be displayed in the box as is
shown below.
"error!  a dialog box is not displayed."

:Function 57 JAWSCursor
:description  The JAWSCursor function activates the
JAWS cursor and deactivates all other cursors. 
Example:
MacroBegin {NumPad Minus}
JAWSCursor()
SayString("JAWS Cursor")
MacroEnd

:Function 58 PCCursor
:description  The PCCursor function activates the PC
cursor and deactivates all other cursors.  Example:
MacroBegin {NumPad Plus}
PCCursor()
SayString("PC Cursor")
MacroEnd

:Function 60 JAWSHome
:description  The JAWSHome function performs a special
version of the "Home" keyboard command.  When the JAWS
cursor, Invisible cursor, or Braille cursor  is
active, the cursor moves to the first text character
or graphics on the line within either the active
application window or child window (depending on
cursor restriction).  When the PC cursor is active,
the macro function Performs the Home function for the
application.  Example:
MacroBegin {Home}
SayString("Home")
JAWSHome()
MacroEnd

:Function 61 JAWSEnd
:description  The JAWSEnd function performs a special
version of the "End" keyboard command.  When the JAWS
cursor, Invisible cursor, or Braille cursor  is
active, the cursor moves to the last text character or
graphics on the line within either the active
application window or active child window (depending
on cursor restriction).  When the PC cursor is active,
the macro function Performs the Home function for the
application.  Example:
MacroBegin {End}
SayString("End")
JAWSEnd()
MacroEnd

:Function 62 JAWSPageUp
:description  The  JAWSPageUp function performs a
special version of the "Page Up" keyboard command. 
When the JAWS cursor, Invisible cursor, or Braille
cursor is active, the cursor moves to the top of the
active application window or to the top of the active
child window (depending on the setting for JAWS cursor
restriction).  When the PC cursor is active, the
insertion point moves up one screen.  Example:
MacroBegin {Page Up}
SayString("Page up")
JAWSPageUp()
MacroEnd

:Function 63 JAWSPageDown
:description  The JAWSPageDown function performs a
special version of the "Page Down" keyboard command. 
When the JAWS cursor, Invisible cursor, or Braille
cursor is active, the cursor moves to the bottom of
the active application window or to the bottom of the
active child window (depending on the setting for JAWS
cursor restriction).  When the PC cursor is active,
the insertion point moves down one screen.  Example:
MacroBegin {Page Down}
SayString("Page down")
JAWSPageDown()
MacroEnd

:Function 64 GetCursorRow
:description The GetCursorRow function determines the
vertical position or row where the active cursor is
located.  It returns an integer which can be spoken by
the SayInteger macro function.  Syntax:
GetCursorRow()
:returns Integer


:Function 65 GetCursorCol
:description  The GetCursorCol function determines the
horizontal position or column where the active cursor
is located.  It returns an integer which can be spoken
with the SayInteger macro function.  Syntax:
GetCursorCol()
:returns Integer

:Function 67 SayCharacter
:description  The SayCharacter function reads the
character or graphic located at the position of the
active cursor.  Example:
MacroBegin {NumPad 5}
SayCharacter()
MacroEnd

:Function 68 SayWord
:description The SayWord function reads the word or
graphic located at the position of the active cursor. 
This example determines if the macro key is pressed
twice, and performs one of two possible actions.  If
it is pressed twice, then it spell the current word,
otherwise, it speaks the current word.
MacroBegin {Insert+NumPad 5}
If (IsSameMacroKey()) Then
SpellWord()
Else
SayWord()
EndIf
MacroEnd

:Function 69 SayField
:description  The SayField function reads the field of
text where the active cursor is pointing.  A "field of
text" is a section or block of text that has a common
attribute, i.e., bold, underlined, italics, or
strikeout.  The use of the attribute must be
contiguous.  SayField is similar to SayChunk in that
they both read information that extends beyond the
limits of SayCharacter, SayWord, and Sayline.  The
SayField function uses logic to determine the text
that is to be spoken, while SayChunk simply reads the
text that was stored in the Off Screen Model as a
single unit.  Syntax: 
SayField()

:Function 70 SayLine
:description  The SayLine function reads the line of
text where the active cursor is located.  JAWS must
interpret whether text that has a similar vertical
position is actually all on the "same line". 
Sometimes information that is considered to be a line
of information is slightly above or below the vertical
position of the active cursor.  The inconsistent
placement of information on the desktop by Windows
applications means that JFW must interpret whether
information should be included or excluded when the
SayLine function is used.  For this reason, complete
accuracy is not always possible when this function is
used.  The SayLine function works somewhat differently
depending upon which cursor is active.  If the PC
Cursor is active, then the SayLine function only reads
the information on the line which is within the active
child window.  When the SayLine function is used with
other cursors, then it reads from one edge of the
application window to the other.  Example:
MacroBegin {Insert+Up Arrow}
SayLine()
MacroEnd

:Function 72 NextCharacter
:description The NextCharacter function performs a
special version of the {RIGHT ARROW} or  next
character keyboard command.  If the PC cursor is
active, then JAWS allows the application to respond;
how and where the insertion point or highlighted
selection cursor moves is completely up to the
application.  When the JAWS cursor, Invisible cursor,
or Braille cursor is active, then JAWS tries to move
the cursor to the
next character or graphic it finds to the right of the
cursor's current location.  This means it may move
across a considerable amount of empty space in order
to find information on the same line.  This function
does not speak the information it finds.  To read the
information, you must add a SayCharacter function to
the macro as is shown in the following example.
MacroBegin {Right Arrow}
NextCharacter()
if (IsJawsCursor() ||CaretVisible()) then
  SayCharacter()
endif

:Function 73 NextWord
:description  The NextWord function performs a special
version of the {CONTROL+RIGHT ARROW} or  next word
keyboard command.  If the PC cursor is active, then
JAWS allows the application to respond; how and where
the insertion point or highlighted selection cursor
moves is completely up to the application.  When the
JAWS cursor, Invisible cursor, or Braille cursor is
active, then JAWS tries to move the cursor to the
next word or graphic it finds to the right of the
cursor's current location.  This means it may move
across a considerable amount of empty space in order
to find information on the same line.  This function
does not speak the information it finds.  To read the
information, you must add a SayCharacter function to
the macro as is done in the example.
MacroBegin {Insert+Right Arrow}
NextWord()
SayWord()
MacroEnd

:Function 74 NextField
:description  The NextField function moves the active
cursor to the next text field.  A "field of text" is
a section or block of text that has a common
attribute, i.e., bold, underlined, italics, or
strikeout.  The use of the attribute must be
contiguous.  Syntax:  
NextField()

:Function 75 NextLine
:description  The NextLine function moves the active
cursor down to the next line.  In many situations,
Windows does not display information in perfect
horizontal rows as is usually done in DOS
applications.  JAWS must therefore interpret whether
text that has a similar vertical position is actually
all on the "same line".  The inconsistent placement of
information on the desktop by Windows applications
means that JFW must interpret how far to move each
time this function is used.  As a result, the cursor
may not move a uniform distance each time this macro
function is used.  To have JAWS read the information
immediately after the Next Line function is used, you
must add a Sayline function as is shown in the
following example.
MacroBegin {Down Arrow}
NextLine()
if (IsJawsCursor() || CaretVisible()) then
  SayLine()
endif
MacroEnd

:Function 77 PriorCharacter
:description  The Prior Character function performs a
special version of the {LEFT ARROW} or  prior
character keyboard command.  If the PC cursor is
active, then JAWS allows the application to respond;
how and where the insertion point or highlighted
selection cursor moves is completely up to the
application.  When the JAWS cursor, Invisible cursor,
or Braille cursor is active, then JAWS tries to move
the cursor to the
prior character or graphic it finds to the left of the
cursor's current location.  This means it may move
across a considerable amount of empty space in order
to find information on the same line.  This function
does not speak the information it finds.  To read the
information, you must add a SayCharacter function to
the macro as is shown in the example.
MacroBegin {Right Arrow}
NextCharacter()
if (IsJawsCursor() ||CaretVisible()) then
  SayCharacter()
endif

:Function 78 PriorWord
:description  The PriorWord function performs a
special version of the {CONTROL+LEFT ARROW} or  prior
word keyboard command.  If the PC cursor is active,
then JAWS allows the application to respond; how and
where the insertion point or highlighted selection
cursor moves is completely up to the application. 
When the JAWS cursor, Invisible cursor, or Braille
cursor is active, then JAWS tries to move the cursor
to the
prior word or graphic it finds to the left of the
cursor's current location.  This means it may move
across a considerable amount of empty space in order
to find information on the same line.  This function
does not speak the information it finds.  To read the
information, you must add a SayWord function to the
macro as is shown below.
MacroBegin {Insert+Left Arrow}
PriorWord()
SayWord()
MacroEnd

:Function 79 PriorField
:description  The PriorField function moves the active
cursor to the prior field.  A "field" is a section or
block of text that has a common attribute, i.e., bold,
underlined, italics, or strike
out.  The use of the attribute must be contiguous. 
The PriorField function does not speak the field, you
must use the SayField function to speak the
information.  Syntax:  
     PriorField()

:Function 80 PriorLine
:description  The PriorLine function performs a
special version of the {UP ARROW} keyboard command. 
If the PC cursor is active, then JAWS allows the
application to respond; how and where the insertion
point or highlighted selection cursor moves is
completely up to the application.  When the JAWS
cursor, Invisible cursor, or Braille cursor is active,
then JAWS tries to move the cursor up to the line
above its current position.  This means it may move up
through a considerable amount of empty space in order
to find another line.  This function does not speak
the information it finds.  To read the information at
the new cursor location, you must add a macro function
such as SayLine to your macros.  Example:
MacroBegin {Up Arrow}
PriorLine()
if (IsJawsCursor() || CaretVisible()) then
  SayLine()
endif
MacroEnd

:Function 81 SayActiveCursor
:description  The SayActiveCursor function speaks the
name of the active cursor, i.e., PC, JAWS, Invisible,
or Braille.  Example: 
MacroBegin {Alt+Delete}
SayActiveCursor()
SayCursorPos(GetActiveCursor())
MacroEnd

:Function 82 SayCursorPos
:description The SayCursorPos function speaks the
position of a cursor.  The following numbers are used
to represent the cursors:  0=JAWS cursor, 1=PC cursor,
2=Invisible cursor, and 3=Braille cursor.  If you
don't want to specify a specific cursor, you can use
a variable as the parameter or  use a macro function
to determine which cursor is active.  You can use the
GetActiveCursor macro function instead of specifying
a number.  This technique is shown below.
MacroBegin {Alt+Delete}
SayActiveCursor()
SayCursorPos(GetActiveCursor())
MacroEnd
:param1  integer  Type a cursor number, type a
variable name, or choose a macro function.  Cursor
numbers are:  0=JAWS cursor, 1=PC cursor, 2=Invisible
cursor, 3=Braille cursor.  A variable can supply a
cursor number or you can use a macro function to
provide a number.  To display a list of macro
functions that can provide the required number, choose
the "Insert Function button" or press {ALT+I}.

:Function 83 SayInteger
:description  The SayInteger function speaks the
number that is indicated as its parameter.  A variable
or a macro function also can be used for the
parameter.  When a variable or macro function is used
as the parameter, then the number that is spoken is
made available by the variable or the macro function. 
The first example simply speaks the number "1879". 
The second example speaks the number that is returned
by the GetActiveCursor macro function.
SayInteger(123)
SayInteger(GetActiveCursor())
:param1 int  Type a number, type a variable name, or
choose a macro function.  A variable can supply an
integer or you can use a macro function to provide
one.  To display a list of macro functions that can
provide the required handle, choose the "Insert
Function button" or press {ALT+I}.

:Function 84 GetActiveCursor
:description  The GetActiveCursor function Determines
which cursor is active.  The numbers that correspond
to the cursors are:  0=JAWS cursor, 1=PC Cursor,
2=Invisible cursor, and 3=Braille cursor.  Syntax:
     GetActiveCursor()
:returns Integer

:Function 85 RouteJawsToPc
:description  The RouteJawsToPc function is used to
reposition the JAWS cursor so that it is in the same
position as the PC cursor.  The JAWS cursor is usually
connected to the mouse pointer, thus, when this
function is used, it  places the mouse pointer on top
of the caret or the highlighted selection cursor, or
on whatever other pointer that is being tracked by the
PC cursor.  Example: 
MacroBegin {Insert+Numpad Minus}
RouteJawsToPc()
JAWSCursor()
SayString("Route jaws to p c")
MacroEnd

:Function 86 RoutePcToJaws
:description  The RoutePcToJaws function attempts to
Move the PC cursor to the position of the JAWS cursor. 
This function is the same as clicking the left mouse
button, which instructs Windows to move its insertion
point to the position of the mouse pointer.  These two
functions are equivalent because the JAWS cursor and
the mouse pointer are connected and move together. 
The successful use of this macro function is related
to the Windows operating system; there are often
situations where Windows cannot move the PC cursor to
the mouse pointer.  Example:
MacroBegin {Insert+Numpad Plus}
RoutePcToJaws()
PCCursor()
SayString("Route p c to jaws")
MacroEnd

:Function 88 ToggleRestriction
:description  The ToggleRestriction function toggles
JAWS between restricted and unrestricted   mode.  When
unrestricted mode is used, the JAWS cursor, Invisible
cursor, or the Braille cursor can be moved anywhere
within the active application window.  When the
movement of one of these cursors is restricted, then
it only can be moved within the current child window. 
The child window could be a list box, an edit field,
or some other type of child window.  When this
function is included in a macro, it  toggles the
setting for cursor restriction to the opposite setting
and returns an integer representing the new setting.
It returns a value of 1 (true) to indicate that
restriction is now on and 0 (false) to indicate that
it is off.  Example:
MacroBegin {insert+R}
if (ToggleRestriction()) then
;when the ToggleRestriction function reports a value
of 1 then 
SayString("Restriction on Jaws Cursor")
else
;when the ToggleRestriction function reports a value
of 0 then 
SayString("restriction off Jaws Cursor")
endif
MacroEnd
:Returns Integer  1=on, 0=off

:Function 89 SayAll
:description  The SayAll function reads the active
window, from the position of the active cursor to the
bottom of the window.  At present the cursor does not
move.  In the near future the cursor will move in
synchronization with the words that are spoken and the
text in the window will automatically scroll so that
an entire document can be read automatically.  Reading
can be stopped by pressing either the  {CONTROL} or
{SHIFT} keys.  In the future, when these keys are
used, the cursor will be positioned on the last word
that was spoken.  Syntax:
SayAll()

:Function 90 GetAppTitle
:description  The GetAppTitle function obtains the
title of the active application program.  To have the
title spoken, you must use this function as a
parameter for a SayString function as shown below.
SayString (GetAppTitle())
:returns String  This is the title of the application.

:Function 91 GetWindowClass
:description The GetWindowClass function obtains the
"window class name" of a window.  Class names are
determined by application programs.  Every window that
is created in Windows has both a window class name and
a Window type name.  These names are unrelated to one
another.  Window class names are designed to be unique
to specific windows in specific applications.  Window
type names are common to all Windows applications. 
Confusion may arise when an application uses a window
class name that is the same as one of the generic
window type names.  The best way to keep the
difference straight is to remember that the "window
type" is a generic name that could be used in any
Windows application, while the "window class" is
specific to an application.  Example of
GetWindowClass:
var
String TheClass ;creates a variable called "TheClass"
Let TheClass = GetWindowClass (GetCurrentWindow ()) 
; This gets the handle for the current window,
;the handle is then used to get the class,
;and then the variable holds the window class name.
SayString (TheClass)
;The sayString function speaks the information in the
variable
;that is called "TheClass".
:param1  handle Type a variable name or choose a macro
function.  A variable can supply a window handle or
you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:returns string  This is the class name.

:Function 92 JAWSWindow
:description  The JAWSWindow function switches the
focus away from the current application and makes JAWS
the active application.  This is equivalent to
choosing "JAWS" from the Task List.  Syntax:
JawsWindow()

:Function 93 MenusActive
:Description  The MenusActive function is used to
determine whether a menu is currently active.  It
returns an integer to indicate the status:  1 = a menu
is active (TRUE) and 0 = a menu is not active (false). 
This might be used in an If-Then-Else statement to
prevent an action when a menu is active.  Example:
Let MenuVariable = MenusActive()
If (MenuVariable ==0) then 
Return ;stop the macro
Else
SayWord()
EndIf
:returns Integer 1=true/active or 0=false/not active

:Function 94 DialogActive
:Description  The DialogActive function is used to
determine whether a dialog box is currently active. 
It returns an integer to indicate the status:  1 = a
dialog box is active (TRUE) and 0 = a dialog box is
not active (false).  This might be used in an If-Then-
Else statement to prevent an action when a dialog box
is active.  Example:
Let DialogVariable = DialogActive()
If (DialogVariable ==0) then 
Return ;stop the macro
Else
SayControl(GetActiveWindow())
EndIf
:returns Integer  1=true/active or 0=false/not active

:Function 95 IsJAWSCursor
:Description  The IsJAWSCursor function determines
whether the JAWS cursor is active.  When it is used,
it returns an integer: 1 = JAWS cursor is active or 0
= JAWS cursor is not active.  Example:
If (IsJawsCursor() == 1) then
;When the JAWS cursor is active, then
SayString("the JAWS cursor is active")
Else
SayString("the JAWS cursor is not active")
EndIf
:returns Integer  1=true/JAWS, 0=false/not JAWS 

:Function 96 ToggleVerbosity
:description  The ToggleVerbosity function changes the
verbosity setting.  The verbosity setting determines
how much information is to be spoken as you use
Windows.  Example:
Var
int Verbosity ;creates a variable called "verbosity"
ToggleVerbosity () ;changes the setting to a new
value.
let VerbositySetting = GetVerbosity () 
;assigns the new verbosity setting to the
;variable called "verbositySetting"
if (Verbositysetting == 0) then
     SayString ("Beginner level")
Return ;Stop the macro
endif
if (VerbositySetting == 1) then
     SayString ("Intermediate level")
Return ;Stop the macro 
endif
if (Verbositysetting == 2) then
     SayString ("Advanced level")
Return ;Stop the macro
endif

:Function 97 GetVerbosity
:Description  The GetVerbosity function is used to
obtain the current setting for verbosity.  The integer
that is returned when the macro function is used can
be evaluated in an If-Then-Else statement as is shown
in the following example.
Var
int VerbositySetting ;creates a variable called
"verbosity"
ToggleVerbosity () ;changes the verbosity setting. 
let VerbositySetting = GetVerbosity () 
;assigns the verbosity setting to the variable
"VerbositySetting"
if (VerbositySetting == 0) then
     SayString ("Beginner level")
Return ;Stop the macro
endif
if (VerbositySetting == 1) then
     SayString ("Intermediate level")
Return ;Stop the macro 
endif
if (VerbositySetting == 2 then
     SayString ("Advanced level")
Return ;Stop the macro
endif
:returns Integer 0 = Beginner, 1 = intermediate, 2 =
advanced

:Function  98 DictionaryWizard
:description  The DictionaryWizard function starts the
Dictionary Wizard utility.  The Dictionary Wizard is
used to add pronunciation rules to a JAWS dictionary. 
Syntax:
DictionaryWizard()

:Function 99 CaretVisible
:Description The CaretVisible function indicates
whether an insertion point or a caret is visible in
the active window.  The macro function returns a value
of 1 to indicate that a caret is visible and a value
of 0 to indicate that it is not visible.  The example
determines whether a screen reading command should be
used when the {DOWN ARROW} is pressed, or whether JAWS
should wait and watch for a change in the highlighting
in the active window.
MacroBegin {DOWN ARROW}
NextLine() ;moves the cursor down, but does not read
text.
if (IsJawsCursor() || CaretVisible()) then
;determines whether either of two conditions are true,
i.e.,
;Is the JAWS cursor active or is the caret visible
;If either condition is true, then do the following.
  SayLine()
endif
;The "Else" is not needed because the "TextEvent" or
;"HighlightedTextEvent"macro will read window changes
when
;the two conditions are false.
:returns Integer  1 = caret is visible, 0 = caret is
not visible 

:Function 100  SayControl
:Description  The SayControl function is used in
dialog boxes to speak the contents of a child window
along with its prompt.  When you are using a dialog
box and press the {TAB}, the selection cursor moves to
a new "dialog control".  These child windows or dialog
controls are specifically known as edit fields, list
boxes, check boxes, radio buttons, etc.  Syntax:
SayControl()
:param1 handle  Type a variable name or choose a macro
function that can provide a window handle for the
macro function.  A variable can supply a window handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.

Function 103 UnloadJAWS
:Description  The UnloadJAWS function closes the JAWS
application.  When this is done, your speech
synthesizer  stops speaking and remains silent until
JAWS is once again loaded.  You are prevented from
accidentally closing JAWS because this  function
pauses and asks you to confirm your intention to exit
the program.  Syntax:
UnloadJAWS()

:Function 104 GraphicWizard
:Description  The GraphicWizard  function starts the
Graphic Wizard utility.  This utility makes it
possible to label the graphic symbols that are used in
Windows.  The JAWS cursor must be positioned on the
graphic symbol you wish to label before this function
is used.  Syntax:
GraphicWizard()

:Function 105 MoveToGraphic
:Description The MoveToGraphic function can be used to
move the JAWS cursor, Invisible cursor, or Braille
cursor in a specific direction to find a graphic
symbol in the active window.  When using this function
you must provide a parameter to indicate the direction
the cursor is to move:  0 = move to first graphic in
the window, 1 = move to next graphic, 2 = move to
prior graphic, and 3 = move to last graphic in the
window.  Example: 
If (MoveToGraphic(1))!=0) then
;The MoveToGraphic tries to move to the next graphic.
;If a graphic is not found, then it returns a value of
0.
;When a value of zero is returned, then
SayCharacter() ;read the name of the graphic
Else
SayString("This is the last graphic in the window")
EndIf
:param1 integer Type a number to indicate the
direction the cursor is to move as it searches for a
graphic:  0 = move to first graphic in the window, 1
= move to next graphic, 2 = move to prior graphic, and
3 = move to last graphic in the window. 
:returns Integer 0 = did not find graphic, non 0 =
success.

:Function 106 GetWindowType
:description  The GetWindowType function obtains the
"window type name" of a window.  When this function is
used, it obtains a string of text that is associated
with the indicated window.  Examples of window types
are:  static text, edit field, check box, radio
buttons, list box, Combo box, Button, scroll bar,
dialog box, menu, etc.  Most every application will
use some or all of these window type names.  Window
class names are designed to be unique to specific
windows in specific applications.  Window type names
are common to all Windows applications.  Confusion may
arise when an application uses a window class name
that is the same as one of the generic window type
names.  The best way to keep the difference straight
is to remember that the "window type" will be a
generic name that could be used in any Windows
application, while the "window class" will be a name
that is usually specific to an application. Example:
var
String TheType ;create a string variable called
"TheType"
Let TheType = GetWindowType (GetCurrentWindow ())
;The variable receives the window type of the current
window.
if (TheType == "static") then
SayString("This is static text, for information only")
EndIf
:param1 handle Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a window
handle or you can use a macro function to provide the
handle.  To display a list of macro functions that can
provide the required handle, choose the "Insert
Function button" or press {ALT+I}.
:Returns String The string is the window type.

:Function 107 Pause
:Description  The Pause function stops the processing
of a macro so that other applications can perform
tasks.  In the Windows environment, multitasking is
accomplished through the sequential sharing of very
small time slices.  When a Pause function is placed in
a macro, JAWS yields to the time needs of other
applications.  When other applications have been given
the opportunity to  use processing time, then JAWS
resumes the macro.  The actual amount of time that
JAWS waits may vary considerably from situation to
situation.  The number of open applications and the
amount of work they need to do determines how long the
pause will last.  The Pause function is different from
the Delay Function which simply causes the macro to
stop, wait, and then resume again without yielding to
the time needs of other applications.  Example:
MacroBegin {ALT+SHIFT+SLASH}
;This macro deletes a word in an edit field or
document window.
{CONTROL+SHIFT+RIGHT ARROW}
;This selects the word to be deleted.
{delete}
;This deletes the word.
pause()
;This causes the macro to wait until the text display
changes
;and the insertion point can move to the new word.
SayWord()
;This reads the new word at the insertion point.
MacroEnd

:Function 108 LeftMouseButton
:Description  The LeftMouseButton function is used to
simulate the pushing of the left button on a mouse. 
If the function is assigned to a macro key and is
pressed twice within one second, then this simulates
a double click of the mouse button.
MacroBegin  {Numpad slash}
SayString("left mouse button")
LeftMouseButton()
MacroEnd

:Function 109 RightMouseButton
:Description  The RightMouseButton function is used to
simulate the pushing of the right button on a mouse. 
If the function is assigned to a macro key and is
pressed twice within one second, then this simulates
a double click of the mouse button.
MacroBegin  {Numpad star}
SayString("right mouse button")
RightMouseButton()
MacroEnd

:Function 110 HasTitleBar
:Description  The HasTitleBar function determines
whether a window has a title bar.  If the window has
a title bar, then the function returns a value of 1. 
If the window does not have a title bar, then a value
of 0 is returned.  Windows that typically have title
bars are dialog boxes and main application windows. 
Syntax:
HasTitleBar()
:Param1: handle  Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:Returns Integer 1 = has a title, 0 = does not have a
title

:Function 111 GetParent
:Description  The GetParent function Returns the
handle of the window that created a specified window. 
For example,  An application's main window can be
called a parent window.  When a dialog box pops up in
the application's main window, the dialog box is the
child of the main application window.  The GetParent
function is used to determine which window created a
certain child window.  It can be used to move up
through a list of window handles in order to get to a
specific window.  Example:
Var
Handle ParentWindowHandle
;This creates a variable called "ParentWindowHandle"
Let ParentWindowHandle = GetParent(GetCurrentWindow())
;GetCurrentWindow provides the handle of the active
window
;which is then used by the GetParent function
;to obtain  the handle for the parent of the active
window.
SayString(GetWindowClass(ParentWindowHandle))
;This speaks the window class name of the parent
window.
:Param1: handle  Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:Returns Handle   This is the handle of the parent
window.
 
:Function 112 GetFirstChild
:Description  The GetFirstChild function provides the
handle of the first child window in a stack of child
windows for a parent window.  This function is useful
when you wish to move through a list of windows.  You
could use the GetParent  and the GetFirstChild
functions to get to the first window in the list as
shown below.
Var
Handle ParentHandle
Handle FirstChildHandle
;This creates a variable called "ParentHandle" and 
;a variable called "FirstChildHandle".
Let ParentHandle = GetParent(GetCurrentWindow())
;GetCurrentWindow provides the handle of the active
window
;which is then used by the GetParent function
Let FirstChildHandle = GetFirstChild(ParentHandle)
;The handle of the parent window is used by the
GetFirstChild
;function to provide the handle for the variable
called
;"FirstChildHandle".
SayString(GetWindowType(FirstChildHandle))
;This speaks the "window type name" of the first child
;window in the list of child windows for the parent
window.
:Param1: handle  Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:Returns Handle  Provides the handle of the first
child window or returns a value of 0 when a child
window cannot be found.

:Function 113 GetNextWindow
:Description  The GetNextWindow function provides a
window handle from the list of window handles.  It is
used to move down through the list of windows.
Example:
GetNextWindow(GetCurrentWindow())
;This uses the current window as the beginning point
and then
;moves down the stack to the next lower window. 
:Param1: handle Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:Returns Handle Provides the handle of the next window
in the stack or returns a value of 0 when a lower
window cannot be found.

:Function 114 GetPriorWindow
:Description  The GetPriorWindow function provides a
window handle from the list of window handles.  It is
used to move up through the list of windows. Example:
GetPriorWindow(GetCurrentWindow())
;This uses the current window as the beginning point
and then
;moves up the stack to the next higher window.
:Param1: handle Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:Returns Handle Provides the handle of the prior
window in the stack or returns a value of 0 when a
higher window cannot be found.

:Function 115 GetFirstWindow
:Description  The GetFirstWindow functions provides
the handle of a window that is at the same           
  logical level as a specified window handle.  This
involves the z-order of the windows.  If for example,
you have four document windows that are arranged in a
square tile arrangement, then all windows have the
same logical level, i.e. their value on the z-axis is
the same.  If the same four windows are arranged in a
cascade arrangement, then each window has a different
z-value.  In the tiled arrangement, you could provide
the window handle of any of the four windows when
using this function, and it will always return the
first of the windows in the list.  Thus if you used
the function as shown below, you can obtain the window
handle of the first child window regardless of which
window is active.
Var
Handle FirstHandle
Let FirstHandle = GetFirstChild(GetCurrentWindow())
;This assigns the handle of the first child window 
;to the variable "FirstHandle".
If (FindString(FirstHandle), "OK", 0,0)) then
LeftMouseButton() 
;If the string "OK" is found in the first child
window, then
;activate the JAWS cursor and push the left mouse
button.
EndIf
:Param1: handle  Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:Returns Handle  The function provides the handle for
the window that is at the same logical level or
returns 0 when a window is not found.

:Function 116 GetFocus
:Description  The GetFocus function obtains the window
handle of the active window, i.e., the window with the
focus.  The GetFocus function is similar to the
GetCurrentWindow function in that both functions are
trying to determine which window has the focus.  The
GetFocus function provides a window handle without
taking into account whether a menu is active or which
cursor is active.  The GetCurrentWindow function is
more sophisticated; it checks for menu status and
cursor status.  Syntax:
GetFocus()
:Returns Handle The function provides the window
handle for the window that has the focus.

:Function 117 GetRealWindow
:Description  The GetReal Window function is used to
move up through the list of window handles and to
locate a "real window".  A real window is a window
that has a title.  This function requires a parameter
to indicate where in the stack of window handles it
should begin.  When a real window is found, then it
returns the handle of that window.
:Param1: handle Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:Returns Handle  The handle of the real window is
returned.

:Function 118 GetAppMainWindow
:Description  The GetAppMainWindow function determines
the window handle for the main window of the active
application.  The function requires that a window
handle be provided as a parameter to mark the
beginning point in the stack of window handles.  The
function moves up the window stack from the specified
beginning handle until it finds the application's main
window.  Example:
GetAppMainWindow(GetCurrentWindow())
;The GetCurrentWindow macro function provides the
handle 
;for the current window.
;The GetAppMainWindow function uses this handle as the
;beginning point for its ascent through the stack of
handles.
:Param1: handle  Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:Returns Handle  The window handle of the
application's main window  is returned. 

:Function 119 GetWindowName
:Description  The GetWindowName function obtains the
title of a window.  Window names are displayed on
title bars of windows.  Application programs, dialog
boxes, and document windows usually have title bars
that display the title of the window.  When the
GetWindowName function is used, a parameter must be
used to specify the handle of a window that has a
title.  All windows do not have titles, and it is
common to use the GetAppWindow or GetRealWindow
functions as a parameter for this function.  This
function returns a value of 0 when a title is not
found.  Example:
Var
Handle RealWindow
String WindowName
;A handle variable and a string variable are created.
Let RealWindow = GetRealWindow(GetCurrentWindow())
;The variable "RealWindow: contains the handle of the
real
;window which is above the current window.
Let WindowName = GetWindowName(RealWindow)
;Gets the title of the real window and places it in
the
;string variable called "WindowName".
SayString(WindowName)
;Speaks the title of the real window.

As an alternative, the preceding commands could be
summarized as follows.
SayString(GetWindowName(GetRealWindow(GetCurrentWind
ow()))
:Param1: handle  Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:Returns String  It returns the title of the window
when a title is present.

:Function 120 GetCurrentWindow
:Description  The GetCurrentWindow function uses an
analytic process to  identify the active window and
then obtains the window handle of the window.  The
GetCurrentWindow function is similar to the GetFocus
function in that both functions are trying to
determine which window is active.  The GetFocus
function provides a window handle without taking into
account whether a menu is active or which cursor is
active.  The GetCurrentWindow function is more
sophisticated; it checks for menu status and cursor
status.  If a menu is active, then it provides the
handle of the menu.  If the PC cursor is active, then
the handle of the window with the cursor is obtained. 
If the JAWS cursor, Invisible cursor, or the Braille
cursor is active, then the function ignore the
location of the PC cursor and provides the handle for
the window where any of these three cursors are
located.  This function is frequently used as a
parameter for other macro functions when a window
handle is required.  Syntax:
GetCurrentWindow()
GetWindowType(GetCurrentWindow())
:Returns Handle  A handle is returned after using a
series of steps to determine which window is active.

:Function 121  SayWindow
:Description  The SayWindow function reads a specified
window. When using this function, it is necessary to
specify two parameters.  You must provide a window
handle and you must indicate whether the function is
to read "all information" or "highlighted
information".  Syntax:
SayWindow(GetCurrentWindow(), 1)
;The parameter "GetCurrentWindow" provides the handle 
;of the active window.  The number 1 indicates that
only
;highlighted information is to be read.
:param1 handle  Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:param2 integer  Type a number to determine how much
information is to be read.  0 = Read everything, 1 =
only read highlighted information.

:Function 122  SayWindowTypeAndText
:Description  The SayWindowTypeAndText function reads
a specified series of information from a window.  It
reads the window title (when one is present), the
window type, the contents in the window, and provides
related information about the current dialog  option. 
When this function is used, it marks the text it reads
so that the Text event and Highlighted Text event
macros do not repeat the same information when they
are triggered.  Syntax:
SayWindowTypeAndText(GetCurrentWindow())
:param1 handle  Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.

:Function 123  ToggleHomeRow
:Description The ToggleHomeRow function toggles home
row mode on and off. When home row mode is on, It is
possible to use the alphabet keys and number keys to
perform macro functions.  When home row mode is turned
off, then all keys perform standard typing functions. 
Thus, home row mode is a shifted state for the
keyboard; It is analogous to the num lock on the
numeric keypad.  When num lock is on, then the numeric
keypad is used to type numbers, and when it is off,
the keys move the cursor.  Home Row mode works in a
similar way.  For example, when home row is on, the
"E" key could be used to read the current line.  When
Home Row is toggled off, then the "E" key could be
used to type the letter "E".  The First sample macro
is used to turn Home Row mode on and off.  The second
sample macro shows how a screen reading function could
be assigned to the "E" key when Home Row mode is
active.

MacroBegin{CONTROL+SPACEBAR}
If (ToggleHomeRow() == 0) Then
SayString("home row off")
Else
SayString("home row on")
EndIf
MacroEnd


MacroBegin{HOMEROW+E}
;This macro is used when home row is on.
;When it is off, it does not perform its task.
SayLine()
MacroEnd
:Returns Integer  When the function is used, it
returns an integer, i.e.,   0 = off, 1 = on.

:Function 124  ExpandString
:Description  The ExpandString function Inserts a
space between adjacent characters of a string of text. 
Can be used in conjunction with SayString to spell 
strings.  Refer to the Insert+Numpad5 macro for an
example. 
SayString(ExpandString(GetWindowClass(GetCurrentWind
ow())))
;First the handle of the current window is determined.
;Next the window class for the current window is
determined.
;Then spaces are added between characters in the class
name.
;Finally, the expanded string is spoken.
:Param1 String Type a text string, type a variable
name, or choose a macro function.  The function must
be provided with a string to expand.  A variable can
supply a string or you can use a macro function to
provide the string.  To display a list of macro
functions that can provide the required string, choose
the "Insert Function button" or press {ALT+I}.
:Returns String When the function is used, it returns
a string that has a space character between each
character in the string.

:Function 125 LeftMouseToggle
:Description  The LeftMouseToggle function is used to
"drag" the mouse pointer.  It produces the same result
that is obtained when the left mouse button on a mouse
is held down while the mouse is being moved.  When the
function is used, it "attaches" or :detaches: the JAWS
cursor and mouse pointer from an object on the
desktop.  When the function is first used, it attaches
the JAWS cursor and the mouse pointer to the object
where the cursor is pointing.  When attached, the
arrow keys can be used to move the mouse pointer which
in turn drags objects around on the desktop.  To drag
an object, move the JAWS cursor to the object, Use the
LeftMouseToggle to attach the JAWS cursor to the
object, then drag the object to the new location. 
Once the object is at the desired location, then use
the LeftMouseToggle function to detach the JAWS cursor
and mouse pointer from the object.  The following
macro could be used to attach or detach the mouse
pointer to an object.
MacroBegin{INSERT+NUMPAD SLASH}
if (LeftMouseToggle()) then
;If the LeftMouseToggle returns a value of 1 (true)
;then do the following.
SayString("Mouse pointer is attached to object")
else
;If the value returned is not 1 (false) then do the
following.
SayString("mouse pointer is detached")
endif
MacroEnd
:Returns Integer  The function returns a value of 1 or
0 to indicate whether the JAWS cursor is "attached" or
"detached" from an object on the desktop.  1 =
attached, 0 = detached.

:Function 126 ToggleScreenEcho
:description  The ToggleScreenEcho cycles through the
various settings for screen echo.  The screen echo
setting determines the amount of information that is
to be read as it is displayed on the desktop.  The
setting for screen echo directly affects the amount of
information that is to be read by the Text event and
Highlighted Text event macros.  Example:
MacroBegin{INSERT+S}
ToggleScreenEcho()
;Changes the screen echo setting to a new value.
if (GetScreenEcho() == 0) then
;Obtains the screen echo setting and compares it
;to a known value.
;If the values are equal then say the following
string.
     sayString("none")
endif
if (GetScreenEcho() == 1) then
;Obtains the screen echo setting and compares it
;to a known value.
;If the values are equal then say the following
string.
     SayString("highlighted")
endif
if (GetScreenEcho() == 2) then
;Obtains the screen echo setting and compares it
;to a known value.
;If the values are equal then say the following
string.
     SayString("all")
endif
MacroEnd

:Function 127 GetScreenEcho
:Description  The GetScreenEcho obtains the current
Screen Echo setting.  The screen echo setting
determines the amount of information that is to be
read as the information is displayed on the desktop. 
The setting for screen echo directly affects the
amount of information that is to be read by the Text
event and Highlighted Text event macros.  Example:
MacroBegin{INSERT+S}
ToggleScreenEcho()
;Changes the screen echo setting to a new value.
if (GetScreenEcho() == 0) then
;Obtains the screen echo setting and compares it
;to a known value.
;If the values are equal then say the following
string.
     sayString("none")
endif
if (GetScreenEcho() == 1) then
;Obtains the screen echo setting and compares it
;to a known value.
;If the values are equal then say the following
string.
     SayString("highlighted")
endif
if (GetScreenEcho() == 2) then
;Obtains the screen echo setting and compares it
;to a known value.
;If the values are equal then say the following
string.
     SayString("all")
endif
MacroEnd
:returns Integer  0 = none, 1 = highlighted, 2 = all.

:Function 128 StringContains
:Description  The StringContains function checks to
see if the second of two text strings is contained
within the first text string.  The search starts at
the beginning of the first text string which is
parameter 1.  Parameter 2 contains the string that is
to be located within parameter 1.  Example:
Var
String TheClass
Let TheClass = GetWindowClass(GetCurrentWindow)
;This initializes the variable "TheClass" with the
class name 
;for the current window.
if (StringContains(TheClass, "_sdm_")) then
;If the window class name in the variable called
"TheClass"
;contains the string "_sdm_", then do what comes next.

SdmSayWindowTypeAndText(GetCurrentWindow())
;Read the window title and contents of the active SDM
window.
Else
SayWindowTypeAndText(GetCurrentWindow())
;Read the window title and contents of the non SDM
window.
EndIf
:param1 String  Type a text string, type a variable
name, or choose a macro function.  The first parameter
contains the string to be searched.  A variable can
supply a string or you can use a macro function to
provide the string.  To display a list of macro
functions that can provide the required string, choose
the "Insert Function button" or press {ALT+I}.
:param2 string Type a text string, type a variable
name, or choose a macro function.  The second
parameter is the search string.  The StringContains
function uses this string when examining the string in
parameter 1.  A variable or a macro function can
supply a string for this parameter.  To display a list
of macro functions that can provide the required
string, choose the "Insert Function button" or press
{ALT+I}.
:Returns Integer  An integer is returned to indicate
the position in string 1 where the two strings begin
to match.  If a value of 5 is returned, then this
means that the string in parameter 2 is present in
parameter 1 and the matching characters begin at the
fifth character in the string.  If a value of 0 is
returned, then this means that the string in parameter
2 is not contain within the string in parameter 1. 

:Function 129 SdmSayWindowTypeAndText
:Description  The SdmSayWindowTypeAndText function is
used with SDM windows.  It reads a specified series of
information from a window.  It reads the window title
(when one is present), the window type, the contents
in the window, and provides related information about
the current dialog box option.  When this function is
used, it marks the text it reads so that the Text
event and Highlighted Text event macros do not repeat
the same information when they are triggered.  This
function performs the same tasks as
SayWindowTypeAndText, however, the  parameters are
different.  A standard dialog box has a unique window
handle for the dialog box itself and unique handles
for each option.  An SDM dialog uses the same window
handle for the dialog box and for each of the dialog
options.  The first parameter provides the handle for
the SDM dialog box itself.  The second parameter
provides the control ID for the active dialog option. 
The following example shows a typical way of using
this function.
SdmSayWindowTypeAndText(GetFocus(), SdmGetFocus())
;The GetFocus function provides the handle of the
dialog box
;The SdmGetFocus function provides the control ID 
;for the dialog option (dialog control)
:Param1 handle Use a function such as GetFocus to
provide the handle of the SDM window.  You can use the
Insert Function dialog to choose a function by
pressing {INSERT+I}.
:param2 int Use the SdmGetFocus function to provide
the control ID for the active child window of the
dialog box.  You can use the Insert Function dialog to
choose this function by pressing {INSERT+I}.

:Function 130 SdmGetFocus
:Description  The SdmGetFocus function is used to get
the ID of the active child window (dialog option or
control) in an SDM dialog box.  This function is used
with the SdmSayWindowTypeAndText function to provide
it with a control ID.  Syntax:
SdmGetFocus(GetFocus())
:param1 handle  Use the GetFocus function to obtain
the handle of the current SDM window.  You can use the
Insert Function dialog to choose this function by
pressing {INSERT+I}.
:returns Integer  This function obtains The control ID
within an SDM dialog.

:Function 131 SdmSayStaticText
:Description  The SdmSayStaticText function reads the
static text in an SDM dialog box.  This is the text
that is not associated with input fields, i.e., text
that is not a title or prompt for input fields.
:param1 handle  Use the GetFocus function to obtain
the handle of the current SDM window.  You can use the
Insert Function dialog to choose this function by
pressing {INSERT+I}.

:Function 132 InvisibleCursor
:description  The InvisibleCursor function activates
the Invisible cursor and deactivates the JAWS, PC, or
Braille  cursor.  The Invisible Cursor is moved around
the desktop in the same way as the JAWS cursor,
however, the mouse pointer does not move along with
this cursor.  The invisible cursor is strictly a
reading cursor.   This cursor is used in situations
where an application program monitors the location and
movement of the mouse pointer, and automatically
changes the window display or makes menu selections. 
Application programs do not monitor the movement of
the invisible cursor and it can be freely moved
without causing the desktop to change.  Syntax:
InvisibleCursor()

:Function 133 IsInvisibleCursor
:description  the IsInvisibleCursor function is used
to determine whether the invisible cursor is active. 
Syntax:
IsInvisibleCursor()
:returns  Integer  1 = active (true), 0= not active
(false).

:Function 134 RouteInvisibleToJaws
:description  The RouteInvisibleToJaws function Moves
the Invisible cursor to the location of the JAWS
cursor and activates the Invisible cursor.  Syntax:
RouteInvisibleToJaws()

:Function 135 RouteInvisibleToPc
:description  The RouteInvisibleToPc function Moves
the Invisible cursor to the location of the PC cursor
and activates the Invisible cursor.  Syntax:
RouteInvisibleToPc()

:Function 136 RouteJawsToInvisible
:description  The RouteJawsToInvisible Moves the JAWS
cursor to the location of the Invisible cursor and
activates the JAWS cursor.  Syntax:
RouteJawsToInvisible()

:Function 139 FindString
:description  The FindString function searches for a
string of text in the specified window.  if the text
is found, then the JAWS
cursor is placed at the beginning of the text string. 
Example:
if (FindString (GetRealWindow, "Save File as Type:",
1,0)) then
;The FindString function is looking for "Save File as
Type:".
;It uses the GetRealWindow function to get the handle 
;of a window with a title line.
;The "1", which follows the quoted string, indicates
that the
;search is to start at the bottom of the window and
move upward.
;The "0", which follows the "1", indicates that the
search is 
;to examine all visible child windows of the active
application.
;If the text is found then do the following.
JawsCursor ()
SayLine ()
NextLine ()
JawsEnd ()
SaytoCursor ()
else
SayString ("not found")
EndIf
:param1 handle  Type the name of a variable or choose
a macro function that can provide a window handle.  A
variable can supply a handle or you can use a macro
function to provide the handle.  To display a list of
macro functions that can provide the required handle
for this function, choose the "Insert Function button"
or press {ALT+I}.
:param2 string  Type the text that is to be spoken,
type a variable name, or choose a macro function.  A
variable can supply a text string or you can use a
macro function to provide the string.  To display a
list of macro functions that can provide a text
string, choose the "Insert Function button" or press
{ALT+I}.  If you type a text string, be sure to
enclose the text within quotation marks.
:param3 integer Type a number to indicate the
direction of the search.  0 =  start the search at the
top of the window and move downward.  1 = start the
search at the bottom of the window and search upward.
:param4 integer  Type a number to indicate whether the
search should be restricted to the active window or it
should extend into all child windows of the active
application.  0 = extend the search to all child
windows of the application.  1 = restrict the search
to the active child window.
:returns Integer The function returns a value of 0 to
indicate search failure, and it returns a non-zero
value when the search is successful. 

:Function 140 FindGraphic
:description  The FindGraphic function searches for a
graphic in the specified window.  if the graphic is
found, then the JAWS
cursor is placed on it.   The graphic must have a text
label associated with it, because the FindGraphic 
function searches for text labels.  Text labels are
assigned by the Graphics Wizard.  Example:
if (FindGraphic(GetRealWindow(GetCurrentWindow()), "ok
button", 1,0)) then
;The FindGraphic function is looking for 
;the text label "ok button".
; it uses the GetCurrentWindow function to get the
handle 
;of the active window
;Then it uses the GetRealWindow function to move up
the stack of
;window handles to get the handle 
;of a window with a title line.
;The "1", which follows the quoted string, indicates
that the
;search is to start at the bottom of the window and
move upward.
;The "0", which follows the "1", indicates that the
search is 
;to examine all visible child windows of the active
application.
;When the text is found then do the following.
JawsCursor ()
SayWord()
LeftMouseButton()
else
SayString ("not found")
EndIf
:param1 handle  Type the name of a variable or choose
a macro function that can provide a window handle.  A
variable can supply a handle or you can use a macro
function to provide the handle.  To display a list of
macro functions that can provide the required handle,
choose the "Insert Function button" or press {ALT+I}.
:param2 string  Type the text label for the graphic
that is to be found.  The text label must be identical
to the label that was assigned to the graphic by the
Graphic Wizard.  Be sure to enclose the text label
within quotation marks.
:param3 integer Type a number to indicate the
direction of the search.  0 =  start the search at the
top of the window and move downward.  1 = start the
search at the bottom of the window and search upward.
:param4 integer  Type a number to indicate whether the
search should be restricted to the active window or it
should extend into all child windows of the active
application.  0 = extend the search to all child
windows of the application.  1 = restrict the search
to the active child window.
:returns Integer The function returns a value of 0 to
indicate search failure, and it returns a non-zero
value when the search is successful. 

:Function 141 IsPCCursor
:Description  The IsPCCursor function determines
whether the PC cursor is active.  It returns an
integer that can be used in an If-Then-Else statement
to provide cursor status information.  Example:
If (IsPCCursor()) Then
;If the PC cursor is active, then do the following
Say String("PC cursor active")
Else
;If the PC cursor is not active, then do the
following. 
SayString("the pc cursor is not active")
SayString("The pc cursor is located at")
SayCursorPos(1)
EndIf
:returns Integer  1= PC cursor active (true), 0 = not
active (false).

:Function 142 IsSameMacroKey
:description  The IsSameMacroKey function determines
whether a macro key has been pressed twice within half 
    a second.  If the same macro key is pressed twice
within one half of a second, then it can perform a
different set of activities.  Example:
MacroBegin {Insert+NumPad 5}
If (IsSameMacroKey ()) Then
;If the same key was pressed twice within a half
second,
;then do the following.
SpellWord()
Else
;If the key was not pressed twice within a half
second,
;then do the following.
SayWord()
EndIf
MacroEnd
:returns Integer  1 = key was pressed twice (true), 0
= key was not press twice (false).

:Function 143 SpellWord
:description  The SpellWord function spells the word
at the active cursor.  Syntax:
SpellWord()

:Function 144 SaveCursor
:description  The SaveCursor function saves the name
of the active cursor.  If the JAWS cursor, Invisible
cursor, or Braille cursor is being used, then the
position of the cursor is also saved.  The SaveCursor
function is often used with the RestoreCursor function
as is shown below.
JAWSCursor()
;This activates the JAWS cursor.
SaveCursor()
This saves the name of the cursor and its location on
the desktop.
JAWSPageDown()
;This moves the JAWS cursor to the bottom of the
active window.
SayLine()
:This reads the information on the line.
RestoreCursor()
;This places the JAWS cursor back at the position it
occupied 
;when the SaveCursor function was used.

:Function 145 RestoreCursor
:description  The RestoreCursor function reactivates
the cursor that was saved when the SaveCursor function
was last used.  If the cursor being restored is the
JAWS cursor, Invisible cursor, or Braille cursor, then
the cursor is also returned to its previous position
on the desktop.  If the cursor currently in use is
different than the cursor that was in use when the
SaveCursor function was used, then the current cursor
is deactivated and the previous cursor is reactivated. 
Example:
JAWSCursor()
;This activates the JAWS cursor.
SaveCursor()
This saves the name of the cursor and its location on
the desktop.
JAWSPageDown()
;This moves the JAWS cursor to the bottom of the
active window.
SayLine()
:This reads the information on the line.
PcCursor()
;This activates the PC cursor 
SayField()
;This reads information in the window where the
insertion point
.;(PC cursor) is located.
RestoreCursor()
;This reactivates the JAWS cursor and places it 
;back at the position it had when the SaveCursor
function was used.

:Function 146 PerformMacroKey
:description  The PerformMacroKey function is use to
start a macro from within another macro.  The
PerformMacroKey function is used to save space within
a macro file.  It is  used when the macro that is to
be performed is very long, or as a strategy to make
the editing of macro files easier.  The following
example shows how the {CONTROL+LEFT ARROW} macro
activates another macro which then performs the
desired task.
MacroBegin {Control+Right Arrow}
PerformMacroKey ({Insert+Right Arrow})
MacroEnd
:param1 String  Type the name of the macro key that is
to be performed.  You must enclose the macro key in
braces as shown below.
{CONTROL+RIGHT ARROW}

     :function 148 SayToCursor
:description  The SayToCursor function reads text on
the current line that is located to the left of the
active cursor.  It does not read the character that is
being pointed to by the insertion point or active
cursor.  Syntax:
SayToCursor()

:Function 149 SayFromCursor
:description  The SayFromCursor function reads text on
the current line that is located to the right of the
current cursor.  It reads the character that is being
pointed to by the insertion point or active cursor. 
Syntax:
SayFromCursor()

:function 150 PassKeyThrough
:description  The PassKeyThrough function passes a key
stroke on to the active application program without
activating a JAWS macro.  This function is Used when
a JAWS macro key and an application keyboard command
are the same.  Normally JAWS intercepts all key
strokes and uses them to activate JAWS macros.  Key
strokes that are not used in a macro source file are
then passed on to the application program which can
then use them for its own purposes.  The following
example shows how the PassKeyThrough function is used
in a macro to pass a keystroke on to an application.
MacroBegin {Insert+3}
if GetVerbosity() == 0 then
;If the verbosity setting is set to "beginner", then 
;say the following prompt.
SayString("Enter key to pass through")
EndIf
PassKeyThrough()
;the macro pauses at this point and waits for the user
to press a
;keyboard command.
;The macro finishes as soon as the keystroke is
pressed.
MacroEnd

:function 151 DescribeFont
:description  The DescribeFont function identifies the
font name, font size,  and font attributes (bold,
underline, italic) that are associated with the
character at the active cursor.  Please note!  The
size of the font that is reported by this function
relates to the size of the font that appears on the
desktop, and usually does not correspond to the size
of the font that will be produced when the text is
printed.  Most word processing programs have an
information window or status line that identifies the
font name and size that will be used when the document
is printed.  In some cases the font in the window
display may be similar to the font size that will be
printed, however, this is not always the case.  Please
Refer to "FONTSIZE.TXT" in the \JFW\TECNOTES
subdirectory for tips for working with font size. 
Example:
MacroBegin{INSERT+F}
if GetVerbosity() == 0 then
;If the verbosity setting is set to "beginner" then
say the following.
SayString("Font equals")
EndIf
DescribeFont()
;Identify the font name, size and attributes.
MacroEnd

:function 152 Delay
:description  the delay function Causes the macro to
standstill for a specified period of time. The Delay
function is not the same as the Pause function, which
yields to the processing needs of other applications. 
The Delay Function simply causes the macro to stop,
wait, and then resume again.  The following Example
uses both the Delay and the Pause functions.
SayString("left mouse button")
;This describes the action that is about to occur.
Delay(10)
;Causes a one second delay.
SayString("please wait")
LeftMouseButton()
;This is equivalent to clicking the left mouse button.
Pause()
;The application is given time to respond to the
clicking of the left
;mouse button before the following commands are
performed.
PcCursor()
SayLine()
;The PC cursor is activated and the information on the
current line
;is then read.
:param1 Integer  Type a number to indicate the amount
of time that the macro should be delayed.  1 = one
tenth of a second.  10 = one second. do not use
numbers with decimals.

:function 153 GetAppFileName
:description  the GetAppFileName function determines
the filename of the active application program, i.e.
the actual program filename that is executed by
windows when it starts the application.  The 
application's filename is used when naming macro
files.  The name of the macro file that is to be used
with a specific application must match the filename of
the application.  For example, Microsoft Word for
Windows has a filename of "WINWORD.EXE", the macro
file therefore has the name   "WINWORD.JMS".  Many
Windows applications use more than one application
filename because they execute additional software
programs when you choose certain menu items.  Thus,
you may need to use this function to check the
application filename when you use components of the
application.  The following macro can be used to
determine the application file name.
MacroBegin{Insert+Q}
SayString ("The application currently being used is
the ")
SayString (GetAppFileName ())
;This speaks the name of the application.
SayString (ExpandString (GetAppFileName ()))
;This spells the name of the application.
Macroend
:returns String  The filename of the active
application or a component of the application that has
been subsequently executed is returned.

:function 154 FindFirstAttribute
:description  The FindFirstAttribute function searches
for text that has specified attributes.  It begins the
search at the upper left corner of the specified
window and moves downward.  If the search is
successful, then The active cursor is placed on the
first character that has the desired attributes.  In
Windows applications where the movement of the PC
cursor is restricted, JAWS will be unable to move the
PC cursor to the attribute.  In word processing
applications, JAWS is usually able to move the PC
cursor. It is possible to search for a single
attribute or a combination of attributes.  The
attributes are:  bold, underline, italic, highlight,
and strikeout.  Example:
FindFirstAttribute(ATTRIB_UNDERLINE+ATTRIB_BOLD) 
;This searches for the first occurrence of text in the
active window
;that is both underlined and in bold print.
:param1 integer  Type the name of the attributes that
should be included in the search.  The attribute names
are:  ATTRIB_BOLD, ATTRIB_UNDERLINE, ATTRIB_ITALIC,
ATTRIB_HIGHLIGHT, and ATTRIB_STRIKEOUT.  You can
search for a single attribute or for a combination of
attributes.  When searching for two or more
attributes, simply place a PLUS SIGN (+) between the
attribute names, i.e. ATTRIB_BOLD+ATTRIB_UNDERLINE.  
:returns Integer  An integer is returned to indicate
the success or failure of the search.  1 = search
success, 0 = search failure.

:function 155 FindNextAttribute
:description  The FindNextAttribute function searches
for text that has specified attributes.  It begins the
search at the location of the active cursor and moves
down through the remainder of the active window.  If
the search is successful, then The active cursor is
placed on the first character that has the desired
attributes.  In Windows applications where the
movement of the PC cursor is restricted, JAWS will be
unable to move the PC cursor to the attribute.  In
word processing applications, JAWS is usually able to
move the PC cursor.  It is possible to search for a
single attribute or a combination of attributes.  The
attributes are:  bold, underline, italic, highlight,
and strikeout.  Example:
FindNextAttribute(ATTRIB_UNDERLINE+ATTRIB_BOLD) 
;This searches for the next occurrence of text in the
active window
;that is both underlined and in bold print.
:param1 integer  Type the name of the attributes that
should be included in the search.  The attribute names
are:  ATTRIB_BOLD, ATTRIB_UNDERLINE, ATTRIB_ITALIC,
ATTRIB_HIGHLIGHT, and ATTRIB_STRIKEOUT.  You can
search for a single attribute or for a combination of
attributes.  When searching for two or more
attributes, simply place a PLUS SIGN (+) between the
attribute names, i.e. ATTRIB_BOLD+ATTRIB_UNDERLINE.  
:returns Integer  An integer is returned to indicate
the success or failure of the search.  1 = search
success, 0 = search failure.

:function 156 FindPriorAttribute
:description  The FindPriorAttribute function searches
for text that has specified attributes.  It begins the
search at the location of the active cursor and moves
up through the remainder of the active window.  If the
search is successful, then The active cursor is placed
on the first character that has the desired
attributes.  In Windows applications where the
movement of the PC cursor is restricted, JAWS will be
unable to move the PC cursor to the attribute.  In
word processing applications, JAWS is usually able to
move the PC cursor.  It is possible to search for a
single attribute or a combination of attributes.  The
attributes are:  bold, underline, italic, highlight,
and strikeout.  Example:
FindPriorAttribute(ATTRIB_UNDERLINE+ATTRIB_BOLD) 
;This searches for the previous occurrence of text
;in the active window that is both underlined and in
bold print.
:param1 integer  Type the name of the attributes that
should be included in the search.  The attribute names
are:  ATTRIB_BOLD, ATTRIB_UNDERLINE, ATTRIB_ITALIC,
ATTRIB_HIGHLIGHT, and ATTRIB_STRIKEOUT.  You can
search for a single attribute or for a combination of
attributes.  When searching for two or more
attributes, simply place a PLUS SIGN (+) between the
attribute names, i.e. ATTRIB_BOLD+ATTRIB_UNDERLINE.  
:returns Integer  An integer is returned to indicate
the success or failure of the search.  1 = search
success, 0 = search failure.

:function 157 FindLastAttribute
:description  The FindLastAttribute function searches
for text that has specified attributes.  It begins the
search at the lower right corner of the active window
and moves up to the upper left corner of the window. 
If the search is successful, then The active cursor is
placed on the first character that has the desired
attributes.  In Windows applications where the
movement of the PC cursor is restricted, JAWS will be
unable to move the PC cursor to the attribute.  In
word processing applications, JAWS is usually able to
move the PC cursor.  It is possible to search for a
single attribute or a combination of attributes.  The
attributes are:  bold, underline, italic, highlight,
and strikeout.  Example:
FindLastAttribute(ATTRIB_UNDERLINE+ATTRIB_BOLD) 
;This searches for the last occurrence of text in the
active window
;that is both underlined and in bold print.
:param1 integer  Type the name of the attributes that
should be included in the search.  The attribute names
are: ATTRIB_BOLD, ATTRIB_UNDERLINE, ATTRIB_ITALIC,
ATTRIB_HIGHLIGHT, and ATTRIB_STRIKEOUT.  You can
search for a single attribute or for a combination of
attributes.  When searching for two or more
attributes, simply place a PLUS SIGN (+) between the
attribute names, i.e. ATTRIB_BOLD+ATTRIB_UNDERLINE.  
:returns Integer  An integer is returned to indicate
the success or failure of the search.  1 = search
success, 0 = search failure.

:function 158 GetWindowTypeCode
:description  The GetWindowTypeCode function returns
a number that represents the window type for the
specified window.  Window type code numbers have been
created to provide greater flexibility when working
with window types.  Every window that is created in
Windows has both a Window type name and a window class
name.  Window class names are designed to be unique to
specific windows in specific applications.  Window
type names are common to all Windows applications. 
The GetWindowTypeCode function performs a similar
purpose as GetWindowType, however, it returns a number
rather than a text string.  These numbers are constant
in all Windows applications and are the same for
English and non English versions of JAWS.  The
constants that are returned by the GetWindowTypeCode
function are listed in \JFW\SETTINGS\ENU\HJCONST.JMH. 
Example:
if (GetWindowTypeCode(GetCurrentWindow()) ==
WT_LISTBOX)
then
;If the code number in the file of constants
(HJCONST.JMH)
;is equal to "WT_LISTBOX", then say the following
string of text.
SayString("This is a list box")
EndIf
:param1 handle  Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:Returns Integer  A window code number for the
specified window is returned by this function.

:function 159 BrailleLineMode
:description  The BrailleLineMode function Sends the
current line of text to a Braille display. This
function is automatically executed ten times per
second and does not need to be routinely used by a
macro.  It can be used in a macro after the
BrailleString function has been used, and you are
ready to display a line of information from the
desktop.  Syntax:
BrailleLineMode()
:returns Void

:function 160 BrailleString
:description  the BrailleString function Sends a
string of text to the Braille display.  This function
is analigus to SayString.  It, however, displays the
information in Braille instead of speaking it.  During
the time that the string is on the Braille display,
the display does not show the contents of the line
where the active cursor is positioned.   When you have
finished reading the string of text, then the
BrailleLineMode function can be used to redisplay the
line of information at the position of the active
cursor.  Syntax:
BrailleString("the string to be displayed in Braille
is the parameter")
:param1 String  Type the text that is to be displayed,
type a variable name, or choose a macro function.  A
variable can supply a text string or you can use a
macro function to provide the string.  To display a
list of macro functions that can provide the required
handle, choose the "Insert Function button" or press
{ALT+I}.  Be sure to enclose the text in quotation
marks as shown in this example.
"Your file was saved successfully"
:returns void


:function 161 EightDotBraille
:description  The EightDotBraille function is used to
make a Braille device use its eight dot Braille mode. 
Syntax:
EightDotBraille()
:returns void

:function 162 SixDotBraille
:description  The SixDotBraille function is used to
make a Braille device use its six dot Braille mode. 
Syntax:
SixDotBraille()
:returns void

:function 163 BraillePanRight
:description  The BraillePanRight function displays
the next group of Braille characters from the line
with the active cursor.  The  characters that will be
displayed when this function is used are those that
follow the last character on the current display of
Braille characters.  In other words, the display moves
or "pans" to the right to reveal additional text. 
Syntax:
BraillePanRight()
:returns Integer The function returns a value of 1
when there is text to be displayed, and returns 0 when
there is no additional text.

:function 164 BraillePanLeft
:description  The BraillePanLeft function displays the
prior group of Braille characters from the line with
the active cursor.  The  characters that will be
displayed when this function is used are those that
precede the first character on the current display of
Braille characters.  In other words, the display moves
or "pans" to the left to reveal additional text. 
Syntax:
BraillePanLeft()
:returns Integer The function returns a value of 1
when there is text to be displayed, and returns 0 when
there is no additional text.

:function 49 FreeMemory
:Description  The FreeMemory function determines the
amount of free memory that is available for variable
strings in the Off Screen Model (OSM).  Syntax:
FreeMemory()
:Returns int The value that is returned by this
function indicates the number of free memory bites.

:function 165 GetCurrentControlID
:description  The GetCurrentControlID function is used
to determine the ID of the active child window or
active control (current option) in a dialog box.  When
a child window or dialog box is active, the function
returns the numeric ID associated with the active
control.  If a child window or dialog box is not
active, then it returns a value of 0.  In a dialog
box, Control ID numbers are unique, with the exception
of dialog controls that contain static text.  Thus,
when more than one dialog control contains static
text, these controls may all have the same ID.  This
function performs the same task as GetControlID but
does not require a window handle.  Syntax:
GetCurrentControlID()
:returns integer The function returns a numeric ID for
the active dialog control.

:function 166 GetLine
:description  The GetLine function makes a copy of the
text on the line where the active cursor is
positioned.  The copied text can then be used by other
macro functions.  Example:
RouteInvisibleToPC()
;Routes the Invisible cursor to the position of the PC
cursor
;and activates the Invisible cursor.
JAWSPageDown()
;Moves the Invisible cursor down to the last line of
text
;in the active window.
SayString(GetLine())
;speaks the information on the line.
:returns string The text on the line is returned for
use by another function.


:function 167 GetWord
:description  The GetWord function makes a copy of the
word where the active cursor is positioned.  The
copied text can then be used by other macro functions. 
Example:
RouteInvisibleToPC()
;Routes the Invisible cursor to the position of the PC
cursor
;and activates the Invisible cursor.
JAWSPageDown()
;Moves the Invisible cursor down to the last line of
text
;in the active window.
JAWSHome()
;Moves the Invisible cursor to the first word on the
line.
SayString(GetWord())
;speaks the first word on the line. 
:returns string A word is returned for use by another
function.


:function 168 GetCharacter
:description  The GetCharacter function makes a copy
of the character or graphic label where the active
cursor is positioned.  The copied text can then be
used by other macro functions.  Example:
RouteInvisibleToPC()
;Routes the Invisible cursor to the position of the PC
cursor
;and activates the Invisible cursor.
JAWSPageDown()
;Moves the Invisible cursor down to the last line of
text
;in the active window.
JAWSHome()
;Moves the Invisible cursor to the first character on
the line.
SayString(GetCharacter())
;speaks the first word on the line. 
:returns string The character or graphic label is
returned for use by another function.

:function 169 GetDefaultButtonName
:description  The GetDefaultButtonName  is used in a
dialog box to identify the default button.  This is
the button that will be chosen when the {ENTER} is
pressed.  Syntax:
SayString(GetDefaultButtonName())
:returns String  The name of the default button is
returned so that it can be used by another function.

:function 170 MoveToWindow
:description  The MoveToWindow function Moves the
active cursor to the top of the specified window.  If
the PC cursor is active when this function is used,
then the JAWS cursor is  activated before the cursor
is moved to the new position.  Syntax:
MoveToWindow()
:param1 Handle  Type the name of a variable or choose
a macro function that can provide a window handle for
this macro function.  A variable can supply a handle
or you can use a macro function to provide the handle. 
To display a list of macro functions that can provide
the required handle, choose the "Insert Function
button" or press {ALT+I}.
:returns integer 1 = the move was successful (true),
0 = not successful (false).

:function 171 SayChunk
:description  The SayChunk function reads the chunk of
text to which the active cursor is pointing.  A chunk
of text is a block of text characters that were
written to the screen in a single operation.  SayChunk
is similar to SayField in that they both read
information that extends beyond the limits of
SayCharacter, SayWord, and Sayline.  The SayField
function uses logic to determine the text that is to
be spoken, while SayChunk simply reads the text that
was stored in the Off Screen Model as a single unit. 
Syntax:
SayChunk()
:returns void

:function 172 GetChunk
:description  The GetChunk function Retrieves a chunk
of text that was displayed in a single operation.  The
function lets the active cursor point to the chunk
that is to be retreaved, and then retreaves it from
the Off Screen Model.  GetChunk is similar to GetField
in that they both read information that extends beyond
the limits of GetCharacter, GetWord, and Getline.  The
GetField function uses logic to determine the text
that is to be retreaved, while GetChunk simply reads
the text that was stored in the Off Screen Model as a
single unit.  Syntax:
SayString(GetChunk())
;The SayString function speaks the text in the chunk.
:returns String  The chunk of text is returned so that
it can be used by another function.


:function 173 GetField
:description  The GetField function Retrieves the
field of text where the active cursor is pointing.  A
"field of text" is a section or block of text that has
a common attribute, i.e., bold, underlined, italics,
or strikeout.  The use of the attribute must be
contiguous.  GetField is similar to GetChunk in that
they both read information that extends beyond the
limits of GetCharacter, GetWord, and Getline.  The
GetField function uses logic to determine the text
that is to be retreaved, while GetChunk simply reads
the text that was stored in the Off Screen Model as a
single unit.  Example:
SayString(GetField())
;The SayString function speaks the text in the Field.
:returns String  The field of text is returned so that
it can be used by another function.

:function 174 SubString
:description  The SubString function extracts part of
a string from another string.  It might be used to
read a portion of the information that appears on a
status line, as shown in the following example.
RouteInvisibleToPC()
;Routes the Invisible cursor to the position of the PC
cursor
;and activates the Invisible cursor.
JAWSPageDown()
;Moves the Invisible cursor down to the last line of
text
;in the active window.
SayString(SubString(GetLine(), 10, 8))
;The SubString function extracts the string that is to
be spoken 
;by the SayString function.
;The GetLine function provides the text string that is
to be processed.
;The "10" indicates that the string to be extracted
begins 
;at the tenth character in the string.
;The "8" indicates that the substring that is to be
extracted 
;is eight characters in length.
:param1 string  Type a string to be processed, type a
variable name, or choose a macro function.  A variable
can supply a text string or you can use a macro
function to provide the string.  To display a list of
macro functions that can provide the required string,
choose the "Insert Function button" or press {ALT+I}. 
If you are typing a text string, then be sure to
enclose the text in quotation marks.
:param2 integer  Type a number to indicate the
position of the first character in the substring which
is to be extracted.  The
index number of the first character in the string is
1.
:param3 integer  Type an integer  to indicate the
number of characters that are to be extracted from the
string.  If the integer is greater than the number of
characters remaining in the string, then the number is
silently rounded down.
:returns String  The substring that was extracted from
the original string is returned so it can be used by
other macro functions.

:function 175 GetControlID
:description  The GetControlID function determines the
Control ID of a child window or a control (option) in
a dialog box.  The function returns the numeric ID
associated with a dialog control or a child window. 
If a child window or dialog box is not active, then it
returns a value of 0.  In a dialog box, Control ID
numbers are unique, with the exception of dialog
controls that contain static text.  Thus, when more
than one dialog control contains static text, these
controls may all have the same ID.  This function
performs the same task as GetCurrentControlID but it
requires a window handle.  Syntax:
GetControlID(TGetCurrentWindow()))
;The control ID of the active window is returned.
:returns integer The function returns a numeric ID for
the 
;active child window or dialog control.
:param1 Handle  Type the name of a variable or choose
a macro function that can provide a window handle for
this function.  A variable can supply a handle or you
can use a macro function to provide the handle.  To
display a list of macro functions that can provide the
required handle, choose the "Insert Function button"
or press {ALT+I}.
:returns integer  The ID of the specified control is
returned.

:function 176 SetBrailleMode
:description  The SetBrailleMode function is used to
choose the mode of operation for a Braille device. 
When line mode is chosen, the Braille device shows the
contents of the line where the active cursor is
positioned.  When the active cursor is moved, the
information being displayed on the Braille device
changes.  When String Mode is used, the Braille device
shows information that has been specifically sent to
it, and does not show the contents of the active
window.  Strings sent to the device while it is in
string mode are queued.  multiple strings can be read
in the order in which they were sent to the Braille
device by using the NextBrailleString and
PriorBrailleString functions.  Example:
SetBrailleMode(BRL_MODE_LINE)
;Uses the constant "BRL_MODE_LINE" to set up the
Braille device
;to use line mode.
:param1 integer Type the name of the constant that
indicates the Braille mode you wish to use. 
BRL_MODE_STRING = string mode, BRL_MODE_LINE = line
mode, and BRL_MODE_ATTRIB = attribute mode.
:returns integer 1 = the mode was set as specified
(true), 0 = the specified mode was not set (false).

:function 177 GetBrailleMode
:Description  The GetBrailleMode function determines
the mode of operation for a Braille device.  Once the
mode has been determined, then a macro can choose a
response that is appropriate for the current mode of
operation.  The file HJCONST.JMH located in the
\JFW\SETTINGS subdirectory lists the constants that
are used with this function.  When line mode is
chosen, the Braille device shows the contents of the
line where the active cursor is positioned.  When the
active cursor is moved, the information being
displayed on the Braille device changes.  When String
Mode is used, the Braille device shows information
that has been specifically sent to it, and does not
show the contents of the active window.  Strings sent
to the device while it is in string mode are queued. 
multiple strings can be read in the order in which
they were sent to the Braille device by using the
NextBrailleString and PriorBrailleString functions. 
Example:
MacroBegin{CONTROL+SHIFT+DOWN ARROW}
If (GetBrailleMode() = BRL_MODE_LINE) then
;If the mode of the Braille device equals line mode,
;then do the following.
NextLine()
;Move the active cursor down to the next line.
Else
;If the Braille device is not using line mode then do
the following. 
NextBrailleString()
;Display the next Braille string.
EndIf
:Returns integer  The constant that represents the
Braille mode is returned.  

:function 178 NextBrailleString
:description  The NextBrailleString function Displays
the next string of Braille characters that are in the
Queue of strings that have been sent to the Braille
device.  This function is used when the Braille device
is in string mode.  Syntax:
NextBrailleString()
:returns integer 1 = another string was displayed
(true), 0 = additional strings could not be displayed
(false).

:function 179 PriorBrailleString
:description  The PriorBrailleString function Displays
the prior string of Braille characters that are in the
Queue of strings that have been sent to the Braille
device.  This function is used when the Braille device
is in string mode.  Syntax:
PriorBrailleString()
:returns integer 1 = another string was displayed
(true), 0 = additional strings could not be displayed
(false).

:Function 180 SpellString
:description  The SpellString function is similar to
the SayString, function, however, it spells the string
instead of speaking the words in the string.  The text
that is to be spelled must be placed within quotation
marks as shown in the example.  
SpellString("GEG72-HA19LAJ-GN")
:param1 string  Type the text that is to be spelled,
type a variable name, or choose a macro function.  A
variable can supply a text string or you can use a
macro function to provide the string.  To display a
list of macro functions that can provide the required
string, choose the "Insert Function button" or press
{ALT+I}.  Be sure to enclose the text in quotation
marks as shown in this example.
"ID HJ95RLX"

:Function 181 Say
:description  The Say function speaks text in a
similar way as the SayString function, but offers the
additional ability to specify speech characteristics. 
In addition to specifying the string that is to be
spoken, an output mode must be specified.  The output
mode determines the voice and punctuation settings for
the type of data that is spoken.  Thus, it is possible
to use separate output modes to read title lines,
dialog controls, menu items, etc.
:param1 String  Type the text that is to be spoken,
type a variable name, or choose a macro function.  A
variable can supply a text string or you can use a
macro function to provide the string.  To display a
list of macro functions that can provide the required
string, choose the "Insert Function button" or press
{ALT+I}.  If a text string is typed, then be sure to
enclose the text in quotation marks. 
:param2 integer Type the constant that represents the
Output Type  that is to be used when the string is
spoken.  Output Types are:  OT_STRING, OT_LINE,
OT_WORD,  OT_CHAR,  OT_FIELD, OT_CHUNK, OT_SAYALL,
OT_SPELL, OT_PHONEMIC, OT_APP_NAME, OT_DIALOG_NAME,
OT_CONTROL_NAME, OT_MDI_NAME, OT_WINDOW_NAME,
OT_GRAPHIC, OT_HELP, OT_STATUS, OT_SELECTED, OT_TEXT,
OT_POSITION, OT_STATIC, OT_FONT, OT_KEYBOARD,
OT_CURSOR, OT_DEBUG.

