Re: Eudora Message Composition issue continued

  • From: Brad D <bram4@xxxxxxxxxxxxx>
  • To: jfw@xxxxxxxxxxxxx
  • Date: Wed, 22 Dec 2004 16:31:39 -0600

Ann,

OK I've worked out the script location for Jaws 6.0. I altered the file as 
suggested, now when I did the semi-colon again, it didn't seem to help the 
window size. So just what is the position needed of the application and the 
message window for Jaws to work properly in Eudora? Maximized application 
as the verbosity settings would suggest, and restore for the message screen?

below is the *.jss* I have. What else is needed do you think?

;Script file for Eudora version 4.X, 5.X, and 6.x
;Copyright 2000 - 2004 Freedom Scientific BLV Group, LLC
;For JAWS version 6.0 (built 12/8/04.
;
; **************************************
;*                 Written By           *
;*      Freedom Scientific Scripting    *
;*              Primary Author: Ken Gould*
;*Extensively modified and enhanced by K. Gould, June/August, 2002
; **************************************
;
include "hjglobal.jsh"
include "hjconst.jsh"
include "HjHelp.jsh"
include "eudora.jsm"
include "eudora.jsh"
include "common.jsm"

void Function AutoStartEvent ()
let nSuppressEcho = false
Pause()
if (DialogActive ()) then
         if GetWindowClass (GetFocus ()) == wcTreeView then
                 ScheduleFunction (sf1_eudora, 50)
         elif (GetWindowClass (GetFocus ()) == wcNoFocus) then
                 ScheduleFunction (sf2_eudora, 20)
         endif
endif
if (EudoraFirstTime == 0) then
         let EudoraVersion = GetEudoraVersion ()
         let EudoraFirstTime = 1
         SayFormattedMessage (ot_app_start, msgAppStart1_L, msgAppStart1_S)
LoadApplicationSettings () ;added by kag
Let DownloadSpeak = GlobalDownloadSpeak
endIf
;following section added by kag to maximize main window
;Delay (2)
If GlobalMaximizeStatus Then
Delay (3)
SaveCursor ()
InvisibleCursor ()
RouteInvisibleToPc ()
JAWSPageUp ()
JAWSEnd ()
MoveToGraphic (GRAPHIC_PRIOR)
Pause ()
If GetWord () == sc23_L Then
;RoutePCToInvisible () ;simulate left mouse click
EndIf
RestoreCursor ()
EndIf
EndFunction

int Function GetEudoraVersion ()
;Determines what version of Eudora is being used
var
         int nVersion
let nVersion = GetProgramVersion (GetAppFilePath ())
return nVersion
EndFunction

Function CloseTree ()
TypeKey (ks1)
pause()
TypeKey (ks2)
EndFunction

void Function FocusEudora ()
let nSuppressEcho = true
SaveCursor ()
InvisibleCursor ()
MoveToWindow (FindDescendantWindow (GetAppMainWindow (GetFocus ()), 
ID_Messages_List))
RoutePcToInvisible ()
let nSuppressEcho = false
EndFunction

int Function DoCustomDialog (string strDLG, handle hReal)
var
         handle hTemp
if (! DialogActive ()) then
         return false
endif
if (strDLG == cScNull) then
         let hTemp = FindDescendantWindow (hReal, iD_Static_About)
         if (! hTemp) then
                 return false
         endif
         SayWindow (hTemp, false)
         return true
elif (strDLG == wn2) then
         let hTemp = FindDescendantWindow (hReal, ID_Static)
         SayWindow (hTemp, false)
         return true
elif (strDLG == wn1) then
         let hTemp = FindDescendantWindow (hReal, ID_Static)
         SayMessage (ot_dialog_text, GetWindowText (hTemp, false))
         return True
elif (strDlg == wn7) then
         let hTemp = FindDescendantWindow (hReal, iD_Static2)
         SayWindow (hTemp, Read_Everything)
         return true
elif (strDLG == wn10) then
         let hTemp = FindDescendantWindow (hReal, iD_Static2)
         if (! hTemp) then
                 return
         endif
         SayWindow (hTemp, Read_Everything)
         return true
endif
return false
EndFunction

int Function AddressBook (string strName, int iD, handle hWnd)
var
         int iBool
if (strName != wn4) then
         let iBool = false
         return iBool
endif
let iBool = true;
if (iD == iD_Email || iD == iD_Email2) then
         SayControlExWithMarkup (hwnd, msg1_L, cScNull, cScNull, cScNull, 
cScNull,       GetWindowText(hWnd, Read_Everything)) ; "E-mail address"
         return iBool
;Following section added by kag to fix non-speaking fields in address book
ElIf GetEudoraVersion () >= 5 && GetWindowName (GetRealWindow 
(GetCurrentWindow ())) == wn4 Then ;are we in address book?
If StringContains (GetWindowText (GetParent (GetCurrentWindow ()), False), 
scPersonalPage)  ;is this the Personal Page?
&& iD == id_Email3 Then ;Email field
SayMessage (ot_control_name, MSG1_l) ;"e-mail address"
SayWindowTypeAndText (GetFocus())
SayWindow (GetFocus (), READ_EVERYTHING)
Return iBOOL
EndIf
If iD == ID_Notes2 Then
SayFormattedMessage (OT_JAWS_MESSAGE, msg2_L, msg2_L) ;Notes
SayWindowTypeAndText (GetFocus ())
SayWindow (GetCurrentWindow (), READ_EVERYTHING)
Return iBOOL
EndIf
If StringContains (GetWindowText (GetParent (GetCurrentWindow ()), False), 
scOtherPage)  ;is this the Other Page?
&& GetWindowClass (GetCurrentWindow ()) == wcRichEdit
&& GetWindowText (GetPriorWindow (GetCurrentWindow ()), False) != 
scNickname Then ;avoid for Nichname field
SayControl (GetFocus())
Return iBool
EndIf
;end kag additions
elif iD == iD_Notes then
         SayControlExWithMarkup (hwnd, msg2_L); "Notes"
         return iBool
endif
SayWindowTypeAndText (hWnd)
return iBool
EndFunction

int Function IsMessageWindow (int iD)
var
         int iBool
if (DialogActive ()) then
         let iBool = false
         return iBool
endif
let iBool = IsVirtualPcCursor ()
         if (iBool) then
         return iBool
endif
if (iD == ID_TO ||
iD == ID_From ||
iD == ID_Subject ||
iD == ID_Cc ||
iD == iD_Bcc ||
iD == iD_Attach) then
         let iBool = true
else
         let iBool = false
endif
return iBool
EndFunction

void Function AddressBookMessage ()
if EudoraFirstTime == 1 then
         SayFormattedMessage (OT_app_start, msg22_L, msg22_S); "After 
selecting a nickname or address book from the tree, press the f6 key to 
edit its properties"
endif
EndFunction

void Function FilterMessage ()
SayFormattedMessage (ot_smart_help, msg24_L, msg24_S); "Once you select a 
filter in the list or press the new button, press the f6 key to modify its 
properties"
EndFunction

void Function SayNonHighlightedText (handle HWND, string Buffer)
var
         int iWinType,
         int iControl,
         string TheClass
;following section speaks number of matches automatically after performing 
search in Find Messages dialog
if (GetWindowName (GetRealWindow (GetFocus ())) == wn11) then
If FindDescendantWindow (GetRealWindow (GetFocus ()), 
ID_MailboxesAndResultsStatus) == hwnd
&& StringContains (buffer, scMatch) Then
Let sMessages = buffer
ScheduleFunction (sf3_Eudora, 20)
Return
EndIf
EndIf
;The following section prevents excess verbiage during download
if (StringContains (Buffer, sc3_L) || ; "Verif"
StringContains (Buffer, sc4_L) || ; "Shut"
StringContains (Buffer, sc5_L) ||; "Log"
StringContains (Buffer, sc6_L) || ; "UIDL"
StringContains (Buffer, sc7_L) || ; "Authen"
StringContains (Buffer, sc8_L) || ; "Quit"
StringContains (Buffer, sc9_L) || ; "connect"
StringContains (Buffer, sc10_L) || ; "User"
StringContains (Buffer, sc11_L) || ; "new mail"
StringContains (Buffer, sc12_L) || ; "Starting"
StringContains (Buffer, sc13_L) || ; "RETR"
StringContains (Buffer, sc14_L) ||; "DELE"
StringContains (Buffer, sc18_L) || ;"Waiting"
StringContains (Buffer, sc19_L) || ;"Dialing"
StringContains (Buffer, sc22_L) || ;"Checking added by kag"
StringContains (Buffer, sc15_L)) then; "LIST"
         return
endif; End of excess verbiage during download test
let iWinType = GetWindowSubTypeCode (hWnd)
if (iWinType == WT_LISTVIEW) then
         let iControl = GetControlID (hWnd)
         if ((iControl == 0) || (iControl == iD_ListView)) then
                 if (DownloadSpeak == 1) then
                         Say (buffer, OT_BUFFER)
                         return
                 endif
         endif
endif
if (nSuppressEcho) then
         return
endif
let TheClass = GetWindowClass(hwnd)
let iControl = GetControlID (hWnd)
; for the SpellCheck dialog
if (hWnd == GetFocus ()) then
         if (iControl == ID_Spell_Correct) then
                 PerformScript ReadMistakeAndSuggestion ()
                 return
         endif
endif
if (GetScreenEcho () > 0) then
         if (hWnd == GetFocus ()) then
                 if (GetWindowSubTypeCode (hWnd) == WT_COMBOBOX) then
                         Say (buffer, OT_BUFFER)
                         return
                 endif
         endif
endif
if ((GetScreenEcho() > 1) ||
;wn10="#32771"
; wcDialog2 = ; "#32771"
(TheClass == wcDialog2 ) ||
(TheClass == wcToolTips) || ; "ToolTips_Class32"
(GetControlID (hwnd) == 8081 && DownLoadSpeak != 0) ||
((TheClass == wcStatic) && (GetWindowClass (GetFocus ())) == wcButton) && 
(DownloadSpeak != 0)) then; "Static"
         if (GetVerbosity () >= 1) then
                 if StringContains (buffer, scDownload1_L) then
                         if (EudoraVersion >= 4) then
                                 let buffer=StringLeft (buffer, 2)
                         elif (EudoraVersion << 4) then
                                 let buffer=StringRight (buffer, 2)
                         endif
                 endif
         endif
         Say (buffer, OT_BUFFER)
endif
EndFunction

void Function SayHighlightedText (handle hwnd, string buffer)
var
         int iWinType,
         int iControl,
         handle hFocus
;The following section prevents excess verbiage during download. added here 
by kag
if (GlobalMenuMode == 0) then
         if (! InHJDialog ()) then
                 if (GetWindowSubTypeCode (hWnd) != 
WT_EXTENDEDSELECT_LISTBOX)&&
  (GetWindowSubTypeCode (hWnd) != WT_LISTBOX)  then
if (StringContains (Buffer, sc3_L) || ; "Verif"
StringContains (Buffer, sc4_L) || ; "Shut"
StringContains (Buffer, sc5_L) ||; "Log"
StringContains (Buffer, sc6_L) || ; "UIDL"
StringContains (Buffer, sc7_L) || ; "Authen"
StringContains (Buffer, sc8_L) || ; "Quit"
StringContains (Buffer, sc9_L) || ; "connect"
StringContains (Buffer, sc10_L) || ; "User"
StringContains (Buffer, sc11_L) || ; "new mail"
StringContains (Buffer, sc12_L) || ; "Starting"
StringContains (Buffer, sc13_L) || ; "RETR"
StringContains (Buffer, sc14_L) ||; "DELE"
StringContains (Buffer, sc18_L) || ;"Waiting"
StringContains (Buffer, sc19_L) || ;"Dialing"
StringContains (Buffer, sc22_L) || ;"Checking added by kag"
StringContains (Buffer, sc15_L)) then; "LIST"
         return
EndIf
EndIf
EndIf
endIf; End of excess verbiage during download test
let iWinType = GetWindowSubTypeCode (hWnd)
if (iWinType == WT_LISTVIEW) then
         let iControl = GetControlID (hWnd)
         if ((iControl == 0) || (iControl == iD_ListView)) then
                 if (DownloadSpeak == 1) then
                         if (GetVerbosity () > beginner) then
                                 if ((StringContains (buffer, 
scDownload1_L)) ||
                                 (StringContains (buffer, scSend1_L))) then
                                         let buffer = StringLeft (buffer, 2)
                                 endif
                         endif
                         Say (buffer, OT_BUFFER)
                 endif
                 return
         endif
endif
if (nSuppressEcho == true) then
         return
endif
let hFocus = GetFocus ()
; wn5 = "Check Spelling"
if (GetControlID (GetFocus ()) == ID_Spell_Correct) then
         if hwnd == hFocus then
                 PerformScript ReadMistakeAndSuggestion ()
                 return
         endif
endif
if (GlobalMenuMode == 0) then
         if (DialogActive ()) then
                 if (hWnd != hFocus) then
                         return
                 endif
         endif
endif
if (GlobalMenuMode == 0) then
         if (hWnd != hFocus) then
                 return
         endif
endif
SayHighlightedText (hWnd, buffer)
EndFunction

void Function FocusChangedEvent (handle FocusWindow, handle PrevWindow)
Var
         int iControl,
         int iPrevControl,
         handle RealWindow,
         string RealWindowName,
         handle AppWindow
;following section meant to correct an intermittent Eudora misbehavior 
which occurs when opening a message
;when the Microsoft viewer is enabled and Eudora first opens the standard 
viewer before switching.
let iControl = GetControlID (FocusWindow)
If iControl == ID_View  Then
If GetCurrentControlId () == 0 Then
Return
EndIf
EndIf
;Next section minimizes delay in reading message and extraneous verbiage 
when opening message with virtual viewer.
If GetControlID (FocusWindow) == 0 Then
If !IsVirtualPCCursor () Then ;give virtual viewer chance to catch up to 
application
Return
EndIf
EndIf
let RealWindow = GetRealWindow (FocusWindow)
let RealWindowName = GetWindowName (RealWindow)
let AppWindow = GetAppMainWindow (FocusWindow)
If GlobalMaximizeStatus Then ;section added by kag to keep mailboxes maximized
If GetControlID (FocusWindow) == ID_Messages_List Then
SaveCursor ()
InvisibleCursor ()
MoveToWindow (GetParent (GetParent (GetParent (GetFocus ()))))
JAWSHome ()
MoveToGraphic (GRAPHIC_NEXT)
MoveToGraphic (GRAPHIC_NEXT)
If GetWord () == sc23_L Then
RoutePCToInvisible () ;simulate left mouse click
EndIf
RestoreCursor ()
EndIf
If RealWindowName  == wn4 Then
SaveCursor ()
InvisibleCursor ()
MoveToWindow (GetParent (GetParent (GetParent (GetParent (GetParent 
(GetParent (GetParent (GetFocus ()))))))))
JAWSHome ()
MoveToGraphic (GRAPHIC_NEXT)
MoveToGraphic (GRAPHIC_NEXT)
If GetWord () == sc23_L Then
RoutePCToInvisible () ;simulate left mouse click
EndIf
RestoreCursor ()
EndIf
EndIf ;maximize mailbox
if (GlobalPrevApp != AppWindow && AppWindow != FocusWindow) then
         ; we've switched to a different app main window,
         ; and it does not have the focus, so announce it
         If ! IsVirtualPcCursor () then
         ;To avoid double speaking of the app title when a message is 
opened in Microsoft viewer
                                    SayWindowTypeAndText (AppWindow)
         endif
endif
if ((GlobalPrevRealName != RealWindowName) ; name has changed
|| (GlobalPrevReal != RealWindow)) then ; or handle has changed, then
         if ((RealWindow != AppWindow) && (RealWindow != FocusWindow)) && 
(! nSuppressEcho) then
                 let iControl = GetControlID (FocusWindow)
                 let iPrevControl = GetControlID (PrevWindow)
                 if (! IsMessageWindow (iControl) && ! IsMessageWindow 
(iPrevControl)) then
                         if (RealWindowName == wn5) then ; "Check Spelling"
                                 SayFormattedMessage (OT_DIALOG_NAME, 
msg23_L, msg23_S)
                         else
If !SuppressHeader      Then
                                 SayWindowTypeAndText (RealWindow)
Else
Let SuppressHeader = False ;reset this variable for next time
EndIf
                         endif
                 endif
                 DoCustomDialog (RealWindowName, RealWindow)
         endif
endif
let GlobalFocusWindow = FocusWindow
if (! DialogActive ()) then
         let iControl = GetControlID (GlobalFocusWindow)
         if (iControl != iD_ListView) then
                 let iGlobalPrevControl = iControl
         endif
endif
if (GlobalPrevFocus != focusWindow) then
         SayFocusedWindow (RealWindowName) ; will use global variable 
GlobalFocusWindow
else
         SayFocusedObject ()
endif
;above perform will return here to finish this routine
;now set all the global variables for next time.
let GlobalPrevReal = RealWindow
let GlobalPrevRealName = RealWindowName
let GlobalPrevApp = AppWindow
let GlobalPrevFocus = FocusWindow
Let SuppressHeader = False ;double check to make sure it's off for next time
EndFunction

void Function SayFocusedWindow (string RealName)
var
         int iDlgBool,; for reduced checks for DialogActive ()
         int iControl
let iDlgBool = DialogActive ()
if nSuppressEcho then
         if (! iDlgBool) then
                 return
         endif
endif
;following section to close Task List redone by kag as old code just didn't 
work right
If (GlobalPrevRealName == wn6 && GlobalPrevRealName != wn12) || 
(GlobalPrevRealName == wn8) then
SpeechOff ()
CloseTaskListWindow ()
SpeechOn ()
Return
EndIf
;section added by kag to initiate SayAll when opening message without 
Microsoft viewer.
let iControl = GetControlID (GlobalFocusWindow)
If iDoSayAll == True  Then
If iControl == ID_View || iControl == ID_Edit Then
Let iDoSayAll = False
If GlobalSayAll Then
SayAll ()
EndIf
Return
EndIf
EndIf
;end kag additions
if (IsVirtualPcCursor ()) then
If !suppressHeader Then ;only need to do this if headers are being read
Pause () ;slows things up just enough so MovePastHeaders doesn't step on 
speaking message data header
                 return
EndIf
EndIf
; wn4 = "Address Book"
if (RealName == wn4) then
         if (AddressBookFirstTime == 0) then
                 let AddressBookFirstTime = 1
                 AddressBookMessage ()
         endif
endif
; wn3 = "Filters"
if (RealName == wn3) then
         if (FilterFirstTime == 0) then
                 let FilterFirstTime = 1
                 FilterMessage ()
         endif
endif
;The following code is commented to avoid double speaking when focus is 
moved to the
;message edit window
;if (iControl == iD_Edit || iControl == iD_View) then
;       SayFormattedMessage (OT_control_type, msg3_L); "Edit"
;Return
;EndIf
if (AddressBook (RealName, iControl, GlobalFocusWindow) == true) then
         return
endif
if (iDlgBool) then
         if (iControl == ID_Spell_Correct) then
                 ; wn5 = "Check Spelling"
                 if (RealName == wn5) then
                         PerformScript ReadMistakeAndSuggestion ()
                         return
                 endif
         endif
endif
;SayWindowTypeAndText (GlobalFocusWindow) ;legacy code, following FS 
conventions
SayFocusedObject ()
EndFunction

Script ScriptFileName ()
ScriptAndAppNames (msgScriptKeyHelp1)
EndScript

Script SayWindowPromptAndText ()
var
         int iControl,
         handle hCurrent,
         int iSubType,
         string sRealName
let hCurrent = GetCurrentWindow ()
Let iSubType = GetWindowSubTypeCode (hCurrent)
If ! iSubType then
         Let iSubType = GetObjectSubTypeCode ()
EndIf
If UserBufferIsActive () then
         If ! iSubType then
                 SayFormattedMessage (ot_no_disable, cmsgVirtualViewer)
                 Return
         EndIf
EndIf
let iControl = GetControlID (hCurrent)
if (iControl == iD_Edit || iControl == iD_View) then
         ;SayFormattedMessage (OT_CONTROL_type, msg3_L); "Edit"
         ;Separate View from Edit:
         if iControl == iD_Edit then
                 IndicateControlType (WT_MULTILINE_EDIT)
         Else
                 IndicateControlType (WT_READONLYEDIT)
         EndIf
         SayTutorialHelp (iSubType, TRUE)
         SayTutorialHelpHotKey (hCurrent, TRUE)
         return
endif
let sRealName = GetWindowName (GetRealWindow (hCurrent))
if not AddressBook (sRealName, iControl, hCurrent) then
         ;SayWindowTypeAndText(hWnd) Is now legacy
         ; As the SayObjectTypeAndText function will fall back on
         ; SayWindowTypeAndText whenever possible
         SayObjectTypeAndText ()
         SayTutorialHelp (iSubType, TRUE)
         SayTutorialHelpHotKey (hCurrent, TRUE)
endif
EndScript

string function AddToString (string sFirstString, string sSecondString)
let sFirstString = "*" + sFirstString + sSecondString + cScBufferNewLine
let sFirstString = StringRight (sFirstString, StringLength (sFirstString) - 1)
return sFirstString
EndFunction

Script ScreenSensitiveHelp ()
var
         handle hWnd,
         int iWinType,
         int iControl
if (IsSameScript ()) then
         AppFileTopic (topic_Eudora)
         return
endif
If UserBufferIsActive () then
          UserBufferDeactivate ()
          SayFormattedMessage (OT_USER_BUFFER, cMsgScreenSensitiveHelpBuf)
          Return
EndIf
let hWnd = GetCurrentWindow ()
let iControl = GetControlID (hWnd)
if (iControl == iD_Edit) then
         ScreenSensitiveHelpForKnownClasses (WT_EDIT)
         return
endif
if (iControl == iD_View) then
         ScreenSensitiveHelpForKnownClasses (WT_READONLYEDIT)
         return
endif
if (IsVirtualPcCursor ()) then
         let iWinType = GetWindowSubTypeCode (GetFocus ())
         if (iWinType) then
                 ScreenSenSitiveHelpVirtualCursor (iWinType)
                 return
         endif
         SayFormattedMessage (ot_user_buffer, msgScreenSensitiveHelp1_L, 
msgScreenSensitiveHelp1_S)
         return
endif
PerformScript ScreenSensitiveHelp()
EndScript

Script HotKeyHelp ()
var
         string sTemp_L,
Int CurrentControlID
Let CurrentControlID = GetCurrentControlID ()
If UserBufferIsActive () then
         UserBufferDeactivate ()
EndIf
         ; wn5 = "Check Spelling"
         if (GetWindowName (GetRealWindow (GetFocus ())) == wn5) then
                 let sTemp_L = AddToString (sTemp_L, msgHotKeyHelp2_L)
                 SayFormattedMessage (ot_user_buffer, sTemp_L, sTemp_L)
ElIf (GetWindowClass (GetFocus()) == wcListView && CurrentControlID == 0)
|| GetWindowClass (GetFocus()) == wcListViewTaskList Then
                 let sTemp_L = AddToString (sTemp_L, msgHotKeyHelp7_L)
                 SayFormattedMessage (ot_user_buffer, sTemp_L, sTemp_L)
ElIf CurrentControlID  == ID_Edit || CurrentControlID   == ID_TO ||
CurrentControlID  == ID_Subject || CurrentControlID  == ID_From ||
CurrentControlID  == ID_CC|| CurrentControlID  == ID_BCC ||
CurrentControlID == ID_Attach Then
                 let sTemp_L = AddToString (sTemp_L, msgHotKeyHelp3_L)
                 SayFormattedMessage (ot_user_buffer, sTemp_L, sTemp_L)
ElIf CurrentControlID == ID_Messages_List  Then
                 let sTemp_L = AddToString (sTemp_L, msgHotKeyHelp4_L)
                 SayFormattedMessage (ot_user_buffer, sTemp_L, sTemp_L)
Elif (GetWindowName (GetRealWindow (GetFocus ())) == wn11) then
                 let sTemp_L = AddToString (sTemp_L, msgHotKeyHelp5_L)
                 SayFormattedMessage (ot_user_buffer, sTemp_L, sTemp_L)
ElIf CurrentControlID == ID_View || CurrentControlID == ID_MSViewer Then
SayFormattedMessage (OT_USER_BUFFER, msgHotKeyHelp6_L, msgHotKeyHelp6_L)
Else
SayFormattedMessage (OT_User_Buffer, msgHotKeyHelp8_L, msgHotKeyHelp8_L)
EndIf
                                         EndScript

Script WindowKeysHelp ()
If UserBufferIsActive () then
         UserBufferDeactivate ()
EndIf
                 SayFormattedMessage (ot_User_Buffer, msgWindowKeysHelp1_L, 
msgWindowKeysHelp1_L)
EndScript

Script JawsDelete ()
; so the delete dialog will speak properly.
var
         handle winHandle,
         string theClass,
         int cId
let winHandle = GetCurrentWindow ()
let theClass = GetWindowClass (winHandle)
let cId = GetControlID (winHandle)
if (cId == ID_Messages_List) && (theClass == wcListBox) && (IsPCCursor ()) then
         let nSuppressEcho = true
         TypeKey (ks6)
         let nSuppressEcho = false
         return
endif
PerformScript JawsDelete()
EndScript

Script  NextDocumentWindow()
var
         int AddressControlID
Let iDoSayAll = False ;prevents unwanted possible SayAll
TypeKey (ks7)
let AddressControlID = GetCurrentControlID ()
if (IsMultiPageDialog ()) then
         SayMessage (OT_DIALOG_NAME, GetDialogPageName ())
         return
endif
if (AddressControlID == 1453 ||AddressControlID == 432) then
         SayFormattedMessage (OT_CONTROL_NAME, msg1_L) ; "E-mail Address"
endif
if (AddressControlId == 1454 || AddressControlID == 433) then
         SayFormattedMessage (OT_CONTROL_NAME, msg2_L) ; "Notes"
         SayWindow (GetCurrentWindow (), read_everything)
endif
EndScript

Script PreviousDocumentWindow()
var
         int AddressControlID
Let iDoSayAll = False ;prevents unwanted possible SayAll
TypeKey (ks8)
let AddressControlID = GetCurrentControlID ()
if (IsMultiPageDialog ()) then
         SayMessage (OT_DIALOG_NAME, GetDialogPageName ())
         return
endif
if (AddressControlID == 1453 || AddressControlID == 432) then
         SayFormattedMessage (OT_CONTROL_NAME, msg1_L) ; "E-mail address"
endif
if (AddressControlId == 1454 || AddressControlID == 433) then
         SayFormattedMessage (OT_CONTROL_NAME, msg2_L) ; "Notes"
         SayWindow (GetCurrentWindow (), read_everything)
endif
EndScript

Script CloseTaskList ()
;script rewritten by kag to be much more reliable.
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
If GlobalHotkeySpeak Then
SayFormattedMessage (OT_STATUS, msg18_L, msg18_S) ; "Close Task Status Window"
Else
SayCurrentScriptKeyLabel ()
EndIf
If CloseTaskListWindow () Then
         SayFormattedMessage (OT_STATUS, msg19_L) ;succeeded
else
         SayFormattedMessage (OT_error, msg20_L, msg20_S); "Sorry, couldn't 
find close symbol."
endif
EndScript

Int Function CloseTaskListWindow ()
SaveCursor ()
InvisibleCursor ()
RouteInvisibleToPC ()
FindGraphic (GetAppMainWindow (GetFocus ()), scCloseSymbol, S_BOTTOM, 
S_UNRESTRICTED)
Pause ()
If GetControlID (GetCurrentWindow ()) == ID_CloseSymbol Then
RoutePCToInvisible () ;simulates left mouse click
RestoreCursor ()
If SentFromWindow != NulSentFromWindow Then
SetFocus (GetParent (SentFromWindow))
Let SentFromWindow = NulSentFromWindow
EndIf
Return True
Else
Return False
EndIf
EndFunction

Script DownloadSpeak ()
If UserBufferIsActive () then
         UserBufferDeactivate ()
EndIf
if (DownloadSpeak == 0) then
         let DownloadSpeak = 1
         SayFormattedMessage (OT_STATUS, msgSessionStatusEnabled_L, 
msgSessionStatusEnabled_S) ; "session message download status enabled"
         return
endif
if (DownloadSpeak == 1) then
         let DownloadSpeak = 0
         SayFormattedMessage (OT_STATUS, msgSessionStatusDisabled_L, 
msgSessionStatusDisabled_S) ; "session message download message status 
disabled"
endif
EndScript

Script ReadMistakeAndSuggestion ()
var
         handle hReal,
         handle hTemp,
         string strText,
         string sRealName
If UserBufferIsActive () then
         UserBufferDeactivate ()
;Pause ()
EndIf
let hReal = GetRealWindow (GetFocus ())
let sRealName = GetWindowName (hReal)
;wn5 = "Check Spelling"
if (sRealName != wn5) then
         SayFormattedMessage (OT_error, msg4_L) ; "You must be in the spell 
checker to use this function."
         return
endif
let hTemp = FindDescendantWindow (hReal, ID_Spell_Mistake)
if ((hTemp) && (IsWindowVisible (hTemp))) then
         SayWindowTypeAndText (GetPriorWindow (hTemp))
         let strText = GetWindowText (hTemp, false)
         SayMessage (ot_user_requested_information, strText); speak the word
         SayMessage (OT_SPELL, strText); spell the word
EndIf
let hTemp = FindDescendantWindow (hReal, ID_Spell_List)
if ((hTemp) && (IsWindowVisible (hTemp))) then
         let strText = GetWindowText (hTemp, false)
         if (! StrText) then
                 SayFormattedMessage (ot_user_requested_information, 
msg5_L); "No suggestions"
                 return
         endif
endif
let hTemp = FindDescendantWindow (hReal, ID_Spell_Correct)
if ((hTemp) && IsWindowVisible (hTemp)) then
         let strText = GetWindowText (hTemp, false)
         SayWindowTypeAndText (GetPriorWindow (hTemp))
         SayMessage (ot_user_requested_information, strText); speak the 
suggested word
         SayMessage (OT_SPELL, strText); spell the suggested word
endif
EndScript

Script ReadWordInContext ()
var
         handle hApp,
         handle hTemp,
         int iCompare,
         int iControl
If UserBufferIsActive () then
         UserBufferDeactivate ()
EndIf
;Next line changed by kag to be more logical.
if (GetWindowName (GetRealWindow (GetFocus ())) != wn5) then
         SayFormattedMessage (OT_error, msg4_L) ;You must be in the spell 
checker to use this function
         return
endif
let hApp = GetAppMainWindow (GetFocus ())
let iCompare = iD_Edit
let hTemp = FindDescendantWindow (hApp, iCompare)
let iControl = GetControlID (hTemp)
if (iControl == iCompare) then
         SaveCursor ()
         InvisibleCursor ()
         MoveToWindow (hTemp)
;next line modified by kag to assure correct operation if first word in 
window is misspelled.
         if (FindNextAttribute (ATTRIB_HIGHLIGHT)) || ColorToRGBString 
(GetColorBackground ()) == 0 then
                 SayLine ()
SpeechOff () ;The next 3 lines prevent extra verbiage when script is 
invoked from Hot Key Help
Pause ()
SpeechOn ()
         else
         SayFormattedMessage (OT_error, msg25_L); "Word In Context Not Found"
                 SayFormattedMessage (OT_error, msg26_L, msg26_S); "The 
highlighted word may be covered up"
         endif
         return
endif
EndScript

Script  OpenSignatures()
;Script rewritten by kag to allow closing the Signatures List by the Enter 
key after selection has been made.
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
PCCursor ()
SaveCursor ()
InvisibleCursor ()
RouteInvisibleToPc ()
SaveCursor ()
If MoveToWindow (FindDescendantWindow (GetAppMainWindow (GetFocus ()), 
id_signatures_list)) then
routePCToInvisible ()
SayFormattedMessage (OT_STATUS, msg15_L) ; "Signatures list"
else
         SayFormattedMessage (OT_error, msg16_L, msg16_S) ; "Signatures 
list not visible."
endif
RestoreCursor ()
RestoreCursor ()
EndScript



Script NewMessageFrom ()
; for reading the From field of messages
SaveCursor ()
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
if (! FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), ID_From)) then
         SayFormattedMessage (OT_error, msg11_L) ; "Not in message edit window"
         return
endif
InvisibleCursor ()
RouteInvisibleToPc ()
MoveToWindow (FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), 
ID_From))
NextWord () ; to ensure that we are actually in the window
if (GetControlID (GetCurrentWindow ()) != ID_From) then
         SayFormattedMessage (OT_error, msgFromNotFound1)
         RestoreCursor ()
         return
endif
SayFormattedMessage (OT_CONTROL_NAME, msgFrom1) ; "from"
SayWindow (GetCurrentWindow (), Read_Everything)
         SayFormattedMessage (OT_smart_help, msgSubjectEdit_L, msgSilent1) 
; "press twice to edit"
RestoreCursor ()
EndScript

Script NewMessageTo ()
;Script to read names in To field of message
; and edit them if necessary
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
if (! FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), ID_From)) then
         SayFormattedMessage (OT_error, msg11_L) ; "Not in message edit window"
         return
endif
SaveCursor ()
InvisibleCursor ()
RouteInvisibleToPc ()
MoveToWindow (FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), 
ID_To))
if (GetControlID (GetCurrentWindow ()) != ID_To) then
         SayFormattedMessage (OT_error, msgToNotFound1) ; "To"
         RestoreCursor ()
         return
endif
if (IsSameScript ()) then
         RoutePCToInvisible ()
         return
endif
SayFormattedMessage (OT_CONTROL_NAME, msgTo1) ; "to"
SayWindow (GetCurrentWindow (), Read_Everything)
         SayFormattedMessage (OT_smart_help, msg14_L, msgSilent1) ; "press 
twice to edit"
RestoreCursor ()
EndScript

Script NewMessageSubject ()
; to allow reading and editing of subject fields during message composition
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
if (! FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), ID_From)) then
         SayFormattedMessage (OT_error, msg11_L) ; "Not in message edit window"
         return
endif

SaveCursor ()
InvisibleCursor ()
RouteInvisibleToPc ()
MoveToWindow (FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), 
ID_Subject))
if (GetControlID (GetCurrentWindow ()) != ID_Subject) then
         SayFormattedMessage (OT_error, msgSubjectNotFound1) ; "subject"
         RestoreCursor ()
         return
endif
if (IsSameScript ()) then
         RoutePCToInvisible ()
         return
endif
SayFormattedMessage (OT_CONTROL_NAME, msgSubject1) ; "subject"
SayWindow (GetCurrentWindow (), Read_Everything)
SayFormattedMessage (OT_smart_help, msg14_L, msgSilent1) ; "press twice to 
edit"
RestoreCursor ()
EndScript

Script NewMessageCC ()
;Script to speak name in CC field of message
; and edit it if necessary
; to allow movement to and editing the field
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
if (! FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), ID_From)) then
         SayFormattedMessage (OT_error, msg11_L) ; "Not in message edit window"
         return
endif
SaveCursor ()
InvisibleCursor ()
RouteInvisibleToPc ()
MoveToWindow (FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), 
ID_Cc))
if (GetControlID (GetCurrentWindow ()) != ID_Cc) then
         SayFormattedMessage (OT_error, msgCCNotFound1) ; "cc"
         RestoreCursor ()
         return
endif
if (IsSameScript ()) then
         RoutePCToInvisible ()
         return
endif
SayFormattedMessage (OT_CONTROL_NAME, msgCC1) ; "cc"
SayWindow (GetCurrentWindow (), Read_Everything)
SayFormattedMessage (OT_smart_help, msg14_L, msgSilent1) ; "press twice to 
edit"
RestoreCursor ()
EndScript

Script NewMessageBCC ()
;Script to speak names in BCC field of new message
; and edit them if necessary
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
if (! FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), ID_From)) then
         SayFormattedMessage (OT_error, msg11_L) ; "Not in message edit window"
         return
endif
SaveCursor ()
InvisibleCursor ()
RouteInvisibleToPc ()
MoveToWindow (FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), 
ID_BCc))
if (GetControlID (GetCurrentWindow ()) != ID_Bcc) then
         SayFormattedMessage (OT_error, msgBCCNotFound1) ; "Bcc"
         RestoreCursor ()
         return
endif
if (IsSameScript ()) then
         RoutePCToInvisible ()
         return
endif
SayFormattedMessage (OT_CONTROL_NAME, msgBCC1) ; "bcc"
SayWindow (GetCurrentWindow (), Read_Everything)
SayFormattedMessage (OT_smart_help, msg14_L, msgSilent1) ; "press twice to 
edit"
RestoreCursor ()
EndScript

Script MoveToMessageBody ()
var
         int counter,
         int iControl,
         handle hTemp,
         handle winhandle,
         string TheClass
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
Let WinHandle = GetCurrentWindow ()
let TheClass = GetWindowClass (WinHandle)
let iControl = GetControlID (WinHandle)
/*if (iControl == ID_Signatures_List) then
         let hTemp = WinHandle
         let hTemp = GetParent (GetParent (hTemp))
         let hTemp = GetFirstChild (GetPriorWindow (hTemp))
         let hTemp = GetNextWindow (hTemp)
         if (GetWindowClass (hTemp) == WCEdit) then
                 JawsCursor ()
                 MoveToWindow (hTemp)
                 LeftMouseButton ()
                 RoutePcToJaws ()
                 PcCursor ()
                 return
         endif
endif*/
if (! FindDescendantWindow (GetRealWindow (WinHandle), ID_From)) ||
(TheClass == WCDialog) then
         SayFormattedMessage (OT_error, msg11_L) ; "Not in message edit window"
         return
endif
if (GetControlID (WinHandle) == ID_Edit) then
         SayFormattedMessage (OT_error, msg12_L) ; "already in message body 
window"
         return
endif
RouteInvisibleToPc ()
InvisibleCursor ()
let WinHandle = GetNextWindow (GetParent (GetCurrentWindow ()))
if (GetControlID (WinHandle) != ID_Edit) then
         SayFormattedMessage (OT_error, msg13_L) ; "message body not found"
         PcCursor ()
         return
endif
MoveToWindow (WinHandle)
Delay (2)
RoutePCToInvisible ()
PcCursor ()
SayLine ()
EndScript

Script MessageBodyDelete ()
;for deleting current message.
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
If GlobalHotkeySpeak Then
         SayFormattedMessage (ot_JAWS_Message, msgMessageBodyDelete1_L, 
msgMessageBodyDelete1_S) ;delete
Else
SayCurrentScriptKeyLabel ()
EndIf
TypeKey (ks20)
EndScript

Script IEFind ()
if IsVirtualPCCursor () then
         SayFormattedMessage (ot_JAWS_Message, msgIEFind1_L, msgSilent1)
         if JAWSFind () && IsVirtualPCCursor () then
                 SayLine ()
         endif
         return
else
         TypeCurrentScriptKey ()
endif
EndScript

Script OpenFindResultsList ()
;script to activate results list in Find Messages Dialog. modified by kag 
for better support
var
         handle hWnd
; wn11 = "Find Messages",
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
If GetWindowName (GetRealWindow (GetCurrentWindow ())) != wn11 Then
         TypeCurrentScriptKey ()
SayCurrentScriptKeyLabel ()
Return
EndIf
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgOpenFindResultsList_L)  ;open Find Results list
Else
SayCurrentScriptKeyLabel ()
EndIf
If GetControlID (GlobalFocusWindow) == iD_FindResultsList || 
GetCurrentControlID () == 0 Then
SayFormattedMessage (OT_ERROR, msgInResultsList_L, msgInResultsList_S)
Return
EndIf
let hWnd = FindDescendantWindow (GetRealWindow (GetFocus ()), 
iD_FindResultsList)
if (hWnd && IsWindowVisible (hWnd)) then
         SayFormattedMessage (OT_CONTROL_NAME, msg21_L); "Results list"
SetFocus (hwnd)
else
SayFormattedMessage (OT_ERROR, msgNotInResultsPage_L, 
msgNotInResultsPage_S) ;not in Results page
endIf
EndScript

Script ReadPreviewPane ()
;added to script file by kag
var
Int Index,
         handle hwnd
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
If (GetEudoraVersion () >= 4) then
         if (GetWindowClass (GetFocus ()) == wcListBox)
&&      (FindDescendantWindow (GetAppMainWindow (GetFocus ()), ID_ListBox)) 
then
;First make sure Task List Window is closed
If CloseTaskListWindow () Then
SayFormattedMessage (OT_JAWS_MESSAGE, msgClosingTaskStatus_L, 
msgClosingTaskStatus_S)
EndIf
                 ; if no messages or none selected
                 If (GetCharacter () == cScNull) then
                         SayMessage (ot_user_requested_information, 
msgNoMessages_L) ; "no messages to view or no message is selected"
                         Return
                 EndIf
                 SaveCursor ()
                 InvisibleCursor ()
                 RouteInvisibleToPc ()
                 MoveToWindow (GetNextWindow (GetParent (GetFocus ())))
                 If (GetControlID (GetCurrentWindow ()) != ID_Edit) then ; 
preview pane w/o caret
         RouteInvisibleToPc ()
                         JAWSPageDown ()
                         PriorLine ()
                         PriorLine ()
                         PriorLine ()
                         If (GetWindowClass (GetCurrentWindow ()) == 
wcHeader) ||
                         (GetWindowClass (GetCurrentWindow ()) == 
wcListBox) then
                                 SayMessage (ot_user_requested_information, 
msgNoPreviewPane_L) ; "Your preview pane is not turned on"
                                 Return
                         EndIf
                 EndIf
JAWSPageDown ()
PriorLine ()
SetRestriction (RestrictWindow)
JAWSHome ()
JAWSPageUp ()
NextLine () NextLine ()
While Index <4
JAWSHome ()
If GetWord () == scSubject || GetWord () == scCC        || StringContains 
(GetWord (), scTo)
|| StringContains (GetLine (), scAt) Then
NextLine ()
EndIf
Let Index = Index +1
EndWhile
SayToBottom ()
SetRestriction (RestrictAppWindow)
         Else
                 SayMessage (ot_user_requested_information, msgNoListBox_L) 
; "You are not in the Messages List Box"
                 PerformScript ScreenSensitiveHelp()
         EndIf
         Return
EndIf ; end of Version 4
; back to Version 3
         SayMessage (ot_user_requested_information, msgNotAvailable_L) ; 
"This option is not available in Version 3"
EndScript

Script Enter ()
SayCurrentScriptKeyLabel ()
;If current line is an attachment, open it
If GetControlID (GlobalFocusWindow) == 0
&& (GetWindowSubtypeCode (GetCurrentWindow ()) == WT_BITMAP
|| GetWindowSubtypeCode (GetCurrentWindow ()) == WT_LINK)
&& Not StringContains (GetLine (), scWWW) Then
SaveCursor ()
RouteInvisibleToPc ()
RoutePCToInvisible () ;simulates left mouse click
RestoreCursor ()
;following section uses SpaceBar to dismiss the New Mail and NO New Mail 
dialogs, since it is more reliable than Enter key
ElIf (GetWindowName (GetRealWindow (GetCurrentWindow ())) == wn6 && 
GetWindowName (GetRealWindow (GetCurrentWindow ())) != wn12)
|| GetWindowName (GetRealWindow (GetCurrentWindow ()))  == wn8 Then
TypeKey (ks4)
Delay (3)
Else
EnterKey ()
EndIf
;for Signatures List
; wcComboBox = "ComboBox"
if (GetControlID (GetCurrentWindow ()) == ID_Signatures_List) &&
(GetWindowClass (GetCurrentWindow ()) == wcComboBox) then
RoutePCToInvisible ()
RoutePCToInvisible () ;script does not work reliably without this repeat
RouteJAWSToPC () ;Get JAWS cursor away from Signature list to prevent extra 
verbiage
Return
EndIf
EndScript

Script CheckMail ()
;added by kag so a refocusing point can be established to return to after 
checking mail and closing task list window.
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgCheckMail_L) ; "Check mail"
Else
SayCurrentScriptKeyLabel ()
EndIf
Let SentFromWindow = GetCurrentWindow ()
TypeCurrentScriptKey ()
Delay (20)
TypeKey (ks23)
EndScript

Script SendMail ()
;added by kag so a refocusing point can be established to return to after 
sending mail and closing task list window.
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgSendMail_L) ; "Check mail"
Else
SayCurrentScriptKeyLabel ()
EndIf
Let SentFromWindow = GetCurrentWindow ()
TypeCurrentScriptKey ()
Delay (20)
TypeKey (ks23)
EndScript



Script OpenTaskStatusWindow ()
;script to open task status window and set a focus to return to when it's 
closed, added by kag
If UserBufferIsActive () then
         UserBufferDeactivate ()
EndIf
If GetControlID (GlobalFocusWindow) != ID_Messages_List Then
SayFormattedMessage (OT_ERROR, msgNotInMailbox_L, msgNotInMailBox_S) ;only 
available in the mailboxes
Return
EndIf
If GlobalHotkeySpeak Then
SayFormattedMessage (OT_JAWS_MESSAGE, msgOpenTaskStatus_L, msgOpenTaskStatus_S)
Else
SayCurrentScriptKeyLabel ()
EndIf
Let SentFromWindow = GetCurrentWindow()
TypeKey (KS21) ;"Alt+T"
TypeKey (KS22) ;"K"
EndScript

Script UpALevel ()
;script modified by kag because problems encountered with Escape key in New 
Mail and No New Mail dialogs.
;following section uses SpaceBar instead of Escape to dismiss the New Mail 
and NO New Mail dialogs,
;since it is more reliable than Escape key
If (GetWindowName (GetRealWindow (GetCurrentWindow ())) == wn6 && 
GetWindowName (GetRealWindow (GetCurrentWindow ())) != wn12)
|| GetWindowName (GetRealWindow (GetCurrentWindow ()))  == wn8 Then
SayCurrentScriptKeyLabel ()
;SayMessage (OT_JAWS_MESSAGE, msgEscape_L)
TypeKey (ks4)
Delay (3)
Else
PerformScript UpALevel() ;default
EndIf
EndScript

Script NewMessageAttachment ()
;Script to speak information in attachment field of message
; and edit it if necessary
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
If (! FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), ID_From)) then
         SayFormattedMessage  (OT_ERROR, msg11_L) ; "Not in message edit 
window"
         Return
EndIf
SaveCursor ()
InvisibleCursor ()
RouteInvisibleToPc ()
MoveToWindow (FindDescendantWindow (GetRealWindow (GetCurrentWindow ()), 
ID_Attach))
If (GetControlID (GetCurrentWindow ()) != ID_Attach) then
         SayMessage (OT_JAWS_MESSAGE, msgAttachNotFound_L) ;attachments 
field not found
         RestoreCursor ()
         Return
EndIf
If (IsSameScript ()) then
         RoutePCToInvisible ()
         Return
EndIf
SayMessage (OT_JAWS_MESSAGE, msgAttachments_L) ;attachments
SayWindow (GetCurrentWindow (), Read_Everything)
         SayFormattedMessage (OT_smart_help, msg14_L, msgSilent1) ; "press 
twice to edit"
RestoreCursor ()
EndScript

Void Function KeyPressedEvent (int nKey, string strKeyName, int 
nIsBrailleKey, int nIsScriptKey)
;added by kag
Var
Int iControl
; SayInteger (nkey)
Let iControl = GetControlID (GlobalFocusWindow)
If iControl == ID_Messages_List && GlobalSuppressHeader Then
If nKey == KEY_ENTER || nKey == Key_NumpadEnter
|| nKey == Key_SpaceBar Then
Let SuppressHeader = True
EndIf
EndIf
;following makes sure opened messages start reading when Microsoft viewer 
is off
If !iDoSayAll   Then
If !IsVirtualPCCursor () Then
If iControl == ID_VIEW || iControl == ID_Edit Then
If nKEY == KEY_CONTROL_D
|| nKEY == KEY_ALT_NUMPADRIGHTARROW || nKEY == KEY_ALT_NUMPADLEFTARROW
|| nKEY == KEY_ALT_EXTENDEDRIGHTARROW || nKEY == KEY_ALT_EXTENDEDLEFTARROW Then
Let IDoSayAll = True
Return
EndIf
EndIf
If iControl == ID_Messages_List Then
If nKey == KEY_ENTER || nKey == KEY_NUMPADENTER
|| nKey == Key_SpaceBar Then
Let iDoSayAll = True
Return
EndIf
EndIf
EndIf
EndIf
;Following speaks status of mailbox in Find Messages Mailbox tree view when 
spacebar is used
If GetWindowName (GetRealWindow (GetCurrentWindow ())) == wn11 Then
If iControl == ID_FindMessagesTreeView
&& nKey == KEY_SPACEBAR Then
Pause ()
SayToCursor ()
Return
EndIf
EndIf
KeyPressedEvent (nKey, strKeyName, nIsBrailleKey, nIsScriptKey) ;default
EndFunction

Script AdjustJAWSVerbosity ()
;added by kag
Var
String List,
Int PriorDownloadSpeak,
Int PriorHotkeySpeak,
Int PriorMaximizeStatus,
Int PriorSuppressHeader,
Int PriorLinkSpeak,
Int PriorSayAll,
Int PriorInsertLines
If (IsSpeechOff ()) then
         performScript adjustJAWSVerbosity() ; default
         return
endIf
if InHJDialog () then
         SayFormattedMessage (OT_error, cMSG337_L, cMSG337_S)
         return
endIf
If (IsVirtualPCCursor ()) Then
         let list = cStrDefaultHtmlList
endIf
let list =EudoraVerbosityItems+List+cStrDefaultList
; store prior settings so we can detect if any change
Let PriorDownloadSpeak = GlobalDownloadSpeak
Let PriorHotkeySpeak = GlobalHotkeySpeak
Let PriorMaximizeStatus = GlobalMaximizeStatus
Let PriorSuppressHeader = GlobalSuppressHeader
Let PriorLinkSpeak = GlobalLinkSpeak
Let PriorSayAll = GlobalSayAll
Let PriorInsertLines = GlobalInsertLines
; determine which settings changed
DlgSelectFunctionToRun (list, AdjustJawsVerbosityDialogName, false)
If PriorDownloadSpeak != GlobalDownloadSpeak Then
Let AnnounceSessionChanges = True
EndIf
If PriorDownloadSpeak != GlobalDownloadSpeak
|| PriorHotkeySpeak != GlobalHotkeySpeak
|| PriorMaximizeStatus != GlobalMaximizeStatus
|| PriorSuppressHeader != GlobalSuppressHeader
|| PriorLinkSpeak != GlobalLinkSpeak
|| PriorSayAll != GlobalSayAll
|| PriorInsertLines != GlobalInsertLines Then
         if saveApplicationSettings() then
                 SayFormattedMessage (ot_jaws_message, 
msgAppSettingsSaved_L, cMsgSilent)
         else
                 SayFormattedMessage (ot_error, msgAppSettingsNotSaved_L)
         endIf
endIf
EndScript

String Function ToggleDownloadSpeak (int iRetCurVal)
;added by kag
if not iRetCurVal then
                 ;update the value
         let globalDownloadSpeak = !globalDownloadSpeak
endIf
;now return the value
if globalDownloadSpeak then
         return msgDownloadSpeakOn_L
else
         return msgDownloadSpeakOff_L
endIf
EndFunction

String Function ToggleHotkeySpeak (int iRetCurVal)
;added by kag
if not iRetCurVal then
                 ;update the value
         let globalHotkeySpeak = !globalHotkeySpeak
endIf
;now return the value
if globalHotkeySpeak then
         return msgHotkeySpeakOn_L
else
         return msgHotkeySpeakOff_L
endIf
EndFunction


String Function ToggleMaximizeStatus (int iRetCurVal)
;added by kag
if not iRetCurVal then
                 ;update the value
         let GlobalMaximizeStatus = !globalMaximizeStatus
endIf
;now return the value
if globalMaximizeStatus then
         return msgMaximizeStatusOn_L
else
         return msgMaximizeStatusOff_L
endIf
EndFunction

String Function ToggleHeaderSpeak (int iRetCurVal)
;added by kag
if not iRetCurVal then
                 ;update the value
         let GlobalSuppressHeader = !globalSuppressHeader
endIf
;now return the value
if globalSuppressHeader then
         return msgSuppressHeaderOn_L
else
         return msgSuppressHeaderOff_L
endIf
EndFunction

String Function ToggleLinkSpeak (int iRetCurVal)
;added by kag
if not iRetCurVal then
                 ;update the value
         let GlobalLinkSpeak = !globalLinkSpeak
endIf
;now return the value
if globalLinkSpeak then
         return msgLinkSpeakOn_L
else
         return msgLinkSpeakOff_L
endIf
EndFunction

String Function ToggleSayAll (int iRetCurVal)
;added by kag
if not iRetCurVal then
                 ;update the value
         let GlobalSayAll = !globalSayAll
endIf
;now return the value
if globalSayAll then
         return msgSayAllOn_L
else
         return msgSayAllOff_L
endIf
EndFunction

String Function ToggleInsertLines (int iRetCurVal)
;added by kag
if not iRetCurVal then
                 ;update the value
         let GlobalInsertLines = !globalInsertLines
endIf
;now return the value
if globalInsertLines then
         return msgInsertLinesOn_L
else
         return msgInsertLinesOff_L
endIf
EndFunction


         Int Function SaveApplicationSettings ()
;added by kag
var
         int iResult
let iResult=iniWriteInteger(Section_applicationVerbositySettings, 
hKey_DownloadSpeakStatus, globalDownloadSpeak, jsiFileName)
iniWriteInteger(Section_applicationVerbositySettings, 
hKey_HotkeySpeakStatus, globalHotkeySpeak, jsiFileName)
iniWriteInteger(Section_applicationVerbositySettings, hKey_MaximizeStatus, 
globalMaximizeStatus, jsiFileName)
iniWriteInteger(Section_applicationVerbositySettings, hKey_SuppressHeader, 
globalSuppressHeader, jsiFileName)
iniWriteInteger(Section_applicationVerbositySettings, hKey_LinkSpeakStatus, 
globalLinkSpeak, jsiFileName)
iniWriteInteger(Section_applicationVerbositySettings, hKey_SayAllStatus, 
globalSayAll, jsiFileName)
iniWriteInteger(Section_applicationVerbositySettings, 
hKey_InsertLinesStatus, globalInsertLines, jsiFileName)
Let DownloadSpeak = GlobalDownloadSpeak
If AnnounceSessionChanges == True Then
Let AnnounceSessionChanges = False
if (DownloadSpeak == 1) then
         SayFormattedMessage (OT_STATUS, msg9_L, msg9_S) ;session message 
download status enabled
endif
if (DownloadSpeak == 0) then
         SayFormattedMessage (OT_STATUS, msg10_L, msg10_S) ;session message 
download status disabled
endif
EndIf
return iResult
EndFunction

Void Function LoadApplicationSettings ()
;added by kag
Let GlobalDownloadSpeak = 
iniReadInteger(Section_applicationVerbositySettings, 
hKey_DownloadSpeakStatus, globalDownloadSpeak, jsiFileName)
Let GlobalHotkeySpeak = 
iniReadInteger(Section_applicationVerbositySettings, 
hKey_HotkeySpeakStatus, globalHotkeySpeak, jsiFileName)
Let GlobalMaximizeStatus = 
iniReadInteger(Section_applicationVerbositySettings, hKey_MaximizeStatus, 
globalMaximizeStatus, jsiFileName)
Let GlobalSuppressHeader = 
iniReadInteger(Section_applicationVerbositySettings, hKey_SuppressHeader, 
globalSuppressHeader, jsiFileName)
Let GlobalLinkSpeak = iniReadInteger(Section_applicationVerbositySettings, 
hKey_LinkSpeakStatus, globalLinkSpeak, jsiFileName)
Let GlobalSayAll = iniReadInteger(Section_applicationVerbositySettings, 
hKey_SayAllStatus, globalSayAll, jsiFileName)
Let GlobalInsertLines = 
iniReadInteger(Section_applicationVerbositySettings, 
hKey_InsertLinesStatus, globalInsertLines, jsiFileName)
EndFunction

Script NewMessage ()
;Starts a new message, added by kag
Let iDoSayAll = False ;prevents unwanted possible SayAll
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgNewMessage_L)
Else
SayCurrentScriptKeyLabel ()
EndIf
TypeCurrentScriptKey ()
EndScript

Script NewMessagePersonality ()
;Starts a new message with choice of sending personality, added by kag
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
Let iDoSayAll = False ;prevents unwanted possible SayAll
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgNewMessage_L)
Else
SayCurrentScriptKeyLabel ()
EndIf
TypeKey (KS25)
SayMessage (OT_JAWS_MESSAGE, MSGChoosePersonality_L, MSGChoosePersonality_S)
TypeKey (KS24)
EndScript

Script QueueMessage ()
;queues a message, added by kag
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgQueueMessage_L)
Else
SayCurrentScriptKeyLabel ()
EndIf
TypeCurrentScriptKey ()
EndScript

Script OpenAddressBook ()
;opens address book, added by kag
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgAddressBook_L)
Else
SayCurrentScriptKeyLabel ()
EndIf
TypeCurrentScriptKey ()
EndScript

Script TakeAddress ()
;takes address from current message for address book, added by kag
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgTakeAddress_L)
Else
SayCurrentScriptKeyLabel ()
EndIf
TypeCurrentScriptKey ()
EndScript

Script FilterMessages ()
;filters messages, added by kag
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgFilterMessages_L)
Else
SayCurrentScriptKeyLabel ()
EndIf
TypeCurrentScriptKey ()
EndScript

Script Close ()
;closes current message or window, added by kag
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgClose_L)
Else
SayCurrentScriptKeyLabel ()
EndIf
TypeCurrentScriptKey ()
EndScript

Script Reply ()
;for replying to current message., added by kag
Let iDoSayAll = False ;To make sure the reply doesn't start reading when 
it's first created
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgReply_L) ;reply
Else
SayCurrentScriptKeyLabel ()
EndIf
TypeCurrentScriptKey ()
Pause ()
If GlobalInsertLines Then
TypeKey (KS18)
TypeKey (KS18)
Pause ()
JAWSTopOfFile ()
EndIf
EndScript

Script ReplyToAll ()
;for replying to all, added by kag
Let iDoSayAll = False ;To make sure the reply doesn't start reading when 
it's first created
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgReplyToAll_L)
Else
SayCurrentScriptKeyLabel ()
EndIf
TypeCurrentScriptKey ()
Pause ()
If GlobalInsertLines Then
TypeKey (KS18)
TypeKey (KS18)
Pause ()
JAWSTopOfFile ()
EndIf
EndScript

Script CheckSpelling ()
;for spell checking messages, added by kag
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgSpellCheck_L)
Else
SayCurrentScriptKeyLabel ()
EndIf
If GetControlID (GlobalFocusWindow) == ID_Edit Then
TypeCurrentScriptKey ()
Else
SayMessage (OT_ERROR, msgNoSpellCheck_L) ;you must be in the spell checker 
to use this function.
EndIf
EndScript

Script OpenFindMessagesTreeView ()
;places focus on the mailbox tree view in the Find Messages dialog. added 
by kag
var
         handle hWnd
;wn11 = Find Messages dialog
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
If GetWindowName (GetRealWindow (GetCurrentWindow ())) != wn11 Then
SayMessage (OT_ERROR, msgNotInFindMessages_L) ;you must be in the Find 
Messages dialog to use this function.
Return
EndIf
If GlobalHotkeySpeak Then
SayMessage (OT_JAWS_MESSAGE, msgOpenMessagesTreeView_L)
Else
SayCurrentScriptKeyLabel ()
EndIf
If GetControlID (GlobalFocusWindow) == ID_FindMessagesTreeView Then
SayFormattedMessage (OT_ERROR, msgInMailboxTreeView_L, msgInMailboxTreeView_S)
Return
EndIf
let hWnd = FindDescendantWindow (GetRealWindow (GetFocus ()), 
ID_FindMessagesTreeView)
if (hWnd && IsWindowVisible (hWnd)) then
SetFocus (hwnd)
         SayFormattedMessage (OT_CONTROL_NAME, msgMailboxesTreeView_L); 
"mailboxes to search
Pause ()
SayToCursor ()
Else
SayFormattedMessage (OT_ERROR, msgNotInMailboxesPage_L, 
msgNotInMailboxesPage_S) ;not in mailboxes page
EndIf
EndScript

Script SayMailboxOrResultsStatus ()
;speaks either the nubmer of mailboxes selected or the number of messages 
found in the search, added by kag
var
         handle hWnd
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
If GetWindowName (GetRealWindow (GetCurrentWindow ())) != wn11 Then
SayMessage (OT_ERROR, msgNotInFindMessages_L)
Return
EndIf
let hWnd = FindDescendantWindow (GetRealWindow (GetFocus ()), 
ID_MailboxesAndResultsStatus)
if (hWnd && IsWindowVisible (hWnd)) then
SaveCursor ()
InvisibleCursor ()
MoveToWindow (hwnd)
SayFromCursor ()
RestoreCursor ()
EndIf
EndScript

Script SayNextLine ()
;following section for speaking end of list message in mailboxes
Var
String sPosition,
String sIndex,
String sCount
If IsPCCursor() && GetControlID (GetCurrentWindow ()) == ID_Messages_List 
&& !UserBufferIsActive () Then
Let sPosition = PositionInGroup ()
Let sIndex = StringSegment (sPosition, cScSpace, 1)
Let sCount = StringSegment (sPosition, cScSpace, 3)
If sCount == scOne && !GetSelectedText () Then
TypeCurrentScriptKey ()
Pause ()
SayMessage (OT_JAWS_Message, msg1of1, msg1of1)
Return
EndIf
If sIndex == sCount Then
If !IsSameScript () Then
SayMessage (OT_JAWS_MESSAGE, msgEndOfList_L, msgEndOfList_S)
EndIf
If IsSameScript () Then
SayLine ()
EndIf
Return
Else
PerformScript SayNextLine()
Return
EndIf
EndIf
;Following section speaks checked or unchecked status of mailboxes in Find 
Messages Mailbox tree view, added by kag
If GetWindowName (GetRealWindow (GetCurrentWindow ())) == wn11
&& GetControlID (GlobalFocusWindow) == ID_FindMessagesTreeView Then
NextLine ()
Pause ()
SayToCursor ()
Else
PerformScript SayNextLine() ;default
  EndIf
EndScript

Script SayPriorLine ()
;following section for speaking beginning of list message in mailboxes
Var
String sPosition,
String sIndex,
String sCount
If IsPCCursor () && GetControlID (GetCurrentWindow ()) == ID_Messages_List 
&& !UserBufferIsActive () Then
Let sPosition = PositionInGroup ()
Let sIndex = StringSegment (sPosition, cScSpace, 1)
Let sCount = StringSegment (sPosition, cScSpace, 3)
If sPosition == scOne && !GetSelectedText () Then
TypeCurrentScriptKey ()
Pause ()
If sCount == 1 Then
SayMessage (OT_JAWS_Message, msg1of1, msg1of1)
Else
SayMessage (OT_JAWS_Message, PositionInGroup (), PositionInGroup ())
EndIf
Return
EndIf
If sIndex == 1 Then
If !IsSameScript () Then
SayMessage (OT_JAWS_MESSAGE, msgBeginningOfList_L, msgBeginningOfList_S)
EndIf
If IsSameScript () Then
SayLine ()
EndIf
Return
Else
PerformScript SayPriorLine()
Return
EndIf
EndIf
;following section speaks checked or unchecked status of mailboxes in Find 
Messages Mailbox tree view, added by kag
If GetWindowName (GetRealWindow (GetCurrentWindow ())) == wn11
&& GetControlID (GlobalFocusWindow) == ID_FindMessagesTreeView Then
PriorLine ()
Pause ()
SayToCursor ()
Else
PerformScript SayPriorLine() ;default
  EndIf
EndScript

Void Function MovePastHeaders ()
Var
Int Loops
JAWSTopOfFile ()
Delay (4)
While GetWord () != wn9 && Loops < 100
NextLine ()
Let Loops = Loops +1
EndWhile
NextLine ()
Let Loops = 0
While GetLine () != cScNull
NextLine ()
Let Loops = Loops +1
If Loops > 40 Then
SayFormattedMessage (OT_ERROR, msgEndOfHeaders_L)
Return
EndIf
EndWhile
NextLine ()
EndFunction

Script DeleteWord ()
;added by kag to announce word at cursor after script runs to delete 
previous word under cursor
Var
Int iControl
Let iControl = GetControlID (GlobalFocusWindow)
If iControl == ID_Messages_List  Then
PerformScript MessageBodyDelete()
Return
EndIf
If GlobalHotkeySpeak Then
If iControl == ID_TO || iControl == ID_SUBJECT
|| iControl == ID_CC || iControl == ID_BCC Then
SayMessage (OT_JAWS_MESSAGE, msgDeleteRight_L) ; "delete word"
Else
SayMessage (OT_JAWS_MESSAGE, msgDeleteWord_L) ; "delete word"
EndIf
Else
SayCurrentScriptKeyLabel ()
EndIf
If GetWindowClass (GetCurrentWindow ()) != WCEdit2
&& GetWindowClass (GetCurrentWindow ()) != WCEdit
&& GetWindowClass (GetCurrentWindow ()) != WCRichEdit
&& GetWindowClass (GetCurrentWindow ()) != wcEudoraEdit Then
SayFormattedMessage (OT_ERROR, msgNotEdit_L, msgNotEdit_S) ;not in edit field
Return
EndIf
TypeCurrentScriptKey ()
Delay (1)
If iControl == ID_TO || iControl == ID_SUBJECT
|| iControl == ID_CC || iControl == ID_BCC Then
SayToCursor ()
Else
SayWord ()
EndIf
EndScript

Script SkipHeaders ()
;moves past message headers in Microsoft viewer, added by kag
If UserBufferIsActive () then
         UserBufferDeactivate ()
Pause ()
EndIf
If GetControlID (GlobalFocusWindow) == ID_View || IsVirtualPCCursor () Then
MovePastHeaders ()
SayAll ()
Else
SayFormattedMessage (OT_ERROR, msgNotViewMessage_L, msgNotViewMessage_S) 
;only available when viewing a message
EndIf
EndScript

Void Function DocumentLoadedEvent ()
var
         int iElementCount,
         int nFrames,
         int nHeadings,
         int nLinks,
         string sFrames,
         string sHeadings,
         string sLinks,
         string sMessageLong,
         string sMessageShort
If IsVirtualPCCursor () Then ;Prevents superfluous calls to MovePastHeaders 
when arrowing through mailboxes, possibly caused by Preview Pane
MovePastHeaders ()
If GlobalLinkSpeak Then
TurnOffFormsMode()
if BackForward == 1 then
         SayLine()
         let BackForward=0
         return
endIf
if GetWindowClass (GetFocus ()) == cwcIEServer then
         PCCursor()
         if  (IsVirtualPCCursor()) then
                 let nFrames = GetHTMLFrameCount()
                 ;Get all headings in document
                 Let nHeadings = GetHeadingCount (0)
                 let nLinks = GetLinkCount()
                 ;The following section provides the messages to be 
formatted into the string for each element type:
                 ;Frames, headings and links.
                 If nFrames == 0 then
                         Let sFrames = cScNull
                 ElIf nFrames == 1 then
                         let sFrames = IntToString (nFrames) + cMsgFrame
                         Let iElementCount = iElementCount+1
                 Else
                         let sFrames = IntToString (nFrames) + cMsgFrames
                         Let iElementCount = iElementCount+1
                 EndIf
                 If nHeadings == 0 then
                         Let sHeadings = cScNull
                 ElIf nHeadings == 1 then
                         Let sHeadings = IntToString (nHeadings)+cMsgHeading
                         Let iElementCount = iElementCount+1
                 Else
                         Let sHeadings = IntToString (nHeadings)+cMsgHeadings
                         Let iElementCount = iElementCount+1
                 EndIf
                 If nLinks == 0 then
                         ;Use specific no link message.
                         Let sLinks = cMsgNoLinks
                         Let iElementCount = iElementCount+1
                 ElIf nLinks == 1 then
                         Let sLinks = IntToString (nLinks)+cMsgLink
                         Let iElementCount = iElementCount+1
                 Else
                         Let sLinks = IntToString (nLinks)+cMsgLinks
                         Let iElementCount = iElementCount+1
                 EndIf
                 ;The order is:
                 ;Frames, headings, links
                 ;Links will always speak, but everything else is 
conditional if there are any.
                 If iElementCount == 3 then
                         Let sMessageLong = FormatString 
(cmsgDocumentLoaded1_L, sFrames, sHeadings, sLinks)
                         Let sMessageShort = FormatString 
(cmsgDocumentLoaded1_S, sFrames, sHeadings, sLinks)
                 ElIf iElementCount == 2 then
                         ;Either frames or headings will be missing.
                         ; In either case, links come last.
                         If nFrames then
                                 Let sMessageLong = FormatString 
(cmsgDocumentLoaded2_L, sFrames, sLinks)
                                 Let sMessageShort = FormatString 
(cmsgDocumentLoaded2_S, sFrames, sLinks)
                         ElIf nHeadings then
                                 Let sMessageLong = FormatString 
(cmsgDocumentLoaded2_L, sHeadings, sLinks)
                                 Let sMessageShort = FormatString 
(cmsgDocumentLoaded2_S, sHeadings, sLinks)
                         EndIf
                 ElIf iElementCount == 1 then
                                 Let sMessageLong = FormatString 
(cmsgDocumentLoaded3_L, sLinks)
                                 Let sMessageShort = FormatString 
(cmsgDocumentLoaded3_S, sLinks)
                 EndIf
                 SayFormattedMessage (OT_SCREEN_MESSAGE, sMessageLong, 
sMessageShort) ; page has x frames, y headings and z links
If GlobalSayAll Then
                 SayAll()
EndIf
         endIf
endIf
Else
If GlobalSayAll Then
SayAll ()
EndIf
EndIf
EndIf
EndFunction

Void Function SpeakFindResults ()
;speaks results from search in Find Messages dialog when called by Schedule 
Function in SayNonHighlightedText
SayMessage (ot_screen_message, sMessages)
Let sMessages = cScNull
EndFunction

Script JAWSHome ()
If GetControlID (GetCurrentWindow ()) == ID_Messages_List Then
If IsPCCursor () Then
SayCurrentScriptKeyLabel ()
SpeechOff ()
JAWSHome ()
Pause ()
SpeechOn ()
SayLine ()
Return
EndIf
EndIf
PerformScript JawsHome()
EndScript

Script JAWSEnd ()
If GetControlID (GetCurrentWindow ()) == ID_Messages_List Then
If IsPCCursor () Then
SayCurrentScriptKeyLabel ()
SpeechOff ()
JAWSEnd ()
Pause ()
SpeechOn ()
SayLine ()
Return
EndIf
EndIf
PerformScript JawsEnd ()
EndScript

Script JAWSPageUp()
If GetControlID (GetCurrentWindow ()) == ID_Messages_List Then
If IsPCCursor () Then
SayCurrentScriptKeyLabel ()
SpeechOff ()
JAWSPageUp()
Pause ()
SpeechOn ()
SayLine ()
Return
EndIf
EndIf
PerformScript JawsPageUp()
EndScript

Script JAWSPageDown()
If GetControlID (GetCurrentWindow ()) == ID_Messages_List Then
If IsPCCursor () Then
SayCurrentScriptKeyLabel ()
SpeechOff ()
JAWSPageDown()
Pause ()
SpeechOn ()
SayLine ()
Return
EndIf
EndIf
PerformScript JawsPageDown()
EndScript






At 10:29 AM 12/19/2004, you wrote:
>The reason the window maximizes automatically is a JFW script.  this is
>from Eudora.jss in JFW5.10:
>
>
>;following section added by kag to maximize main window
>;Delay (2)
>If GlobalMaximizeStatus Then
>Delay (3)
>SaveCursor ()
>InvisibleCursor ()
>RouteInvisibleToPc ()
>JAWSPageUp ()
>JAWSEnd ()
>MoveToGraphic (GRAPHIC_PRIOR)
>Pause ()
>If GetWord () == sc23_L Then
>RoutePCToInvisible () ;simulate left mouse click
>
>Putting a semicolon before the last line should prevent the window maximizing.
>
>At 08:33 AM 12/19/2004, you wrote:
> >Thank you. Hopefully someone there wil know how to keep the window in
> >restore size or have scripts to accommodate it.
> >
> >Brad
> >
> >
> >At 08:26 PM 12/18/2004, you wrote:
> > >Brad,
> > ><snip I use to be on
> > >the Blind Eudora list but don't have that info anymore... do you have it?
> > >PL] Yes I am still subscribed.
> > >Go to //www.freelists.org/webpage/blindeudora
> > >
> > >Pranav
> > >-------------------------------------------------------------------------
> > --------------------------------------------------------------
> > >Pranav
> > >
> > >--
> > >To post a message to the list, send it to jfw@xxxxxxxxxxxxx
> > >To unsubscribe from this mailing list, send a message to
> > >jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.
> > >Archives located at: //www.freelists.org/archives/jfw
> > >
> > >If you have any concerns about the list, post received from the list, or
> > >the way the list is being run, do not post them to the list. Rather
> > >contact the list owner at jfw-admins@xxxxxxxxxxxxxx
> >
> >
> >--
> >To post a message to the list, send it to jfw@xxxxxxxxxxxxx
> >To unsubscribe from this mailing list, send a message to
> >jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.
> >Archives located at: //www.freelists.org/archives/jfw
> >
> >If you have any concerns about the list, post received from the list, or
> >the way the list is being run, do not post them to the list. Rather
> >contact the list owner at jfw-admins@xxxxxxxxxxxxxx
>
>
>--
>To post a message to the list, send it to jfw@xxxxxxxxxxxxx
>To unsubscribe from this mailing list, send a message to 
>jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.
>Archives located at: //www.freelists.org/archives/jfw
>
>If you have any concerns about the list, post received from the list, or 
>the way the list is being run, do not post them to the list. Rather 
>contact the list owner at jfw-admins@xxxxxxxxxxxxxx


--
To post a message to the list, send it to jfw@xxxxxxxxxxxxx
To unsubscribe from this mailing list, send a message to 
jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.
Archives located at: //www.freelists.org/archives/jfw

If you have any concerns about the list, post received from the list, or the 
way the list is being run, do not post them to the list. Rather contact the 
list owner at jfw-admins@xxxxxxxxxxxxxx

Other related posts: