[jawsscripts] Skipping screen
- From: "Dean Masters" <dwmasters@xxxxxxxxxxxxx>
- To: "JAWS Scripts" <jawsscripts@xxxxxxxxxxxxx>
- Date: Wed, 18 Feb 2009 16:52:30 -0500
I am trying to get the combination of the two following to read a screen of
text then move to the next screen and red it, etc. It wil read the first
page then repeat the last line which may be the first line of the next page.
It might read another line or two then skip to the next screen. Does anyone
know why it might be skipping? It seems like the movement between screens is
faster than JAWS can read the screens. Is there any way to slow this down
without using the delay function:
Void Function TopOfText ()
VAR
String CurrentLine,
string LastLine,
Int iKeyWasPressed ;use this to terminate the while loop.
JAWSCursor ()
Let LastLine = GetLine (); saves first line
SayLine ();speaks first line
JAWSHome ()
NextLine ();scrols to next line
Pause ()
Let CurrentLine = GetLine ();saves new line
While (CurrentLine != LastLine && iKeyWasPressed ==0);speak if two
adjacentlines are dissimilar or if a key was pressed
Let iKeyWasPressed = IsKeyWaiting () ; set variable to true if a key was
pressed.
If iKeyWasPressed then
Return
Else
SayLine ()
Let LastLine = CurrentLine; sets up for new comparison
JAWSHome ()
NextLine ();scrolls down one line
RefreshWindow (GetCurrentWindow ());needed for some Bibles
Pause ()
Let CurrentLine = GetLine (); saves the new line
EndIf
EndWhile;loop until the two lines are the same
If iKeyWasPressed then
Return
Else
PCCursor ()
TypeKey ("spacebar");new keystroke in Libronix 3c
Pause ()
JAWSCursor ()
If FindString (GetFocus (), CurrentLine, s_bottom, s_restricted) then
JAWSCursor ()
NextLine ()
Else
JAWSPageUp ()
JAWSHome ()
EndIf
EndIf
EndFunction
Script ReadContinuously ()
VAR
string CurrentPage,
string LastPage,
string sScheme,
string sScheme1,
string sScheme2
Let sScheme = GetCurrentSchemeName ()
If GetCurrentSchemeName () != "LDLS" then
Let sScheme1 = sScheme
Let sScheme2 = sScheme
Else
Let sScheme1 = "Classic"
Let sScheme2 = "LDLS"
EndIf
Let g_ChapterAndVerseToggle = 0;mutes speaking of the chapter and verse
SwitchToScheme (sScheme1);switches to the classic scheme if in LDLS scheme
PCToText ()
JAWSCursor ()
RefreshWindow (GetCurrentWindow ())
Pause ()
Let LastPage = GetWindowText (GetFocus (), false);saves Current page
TopOfText ();speaks screen of text then scrolls to the next page
Let CurrentPage = GetWindowText (GetFocus (), false);saves new page
While (CurrentPage != LastPage) ;speak if two concurrent pages are
dissimilar
Let LastPage = CurrentPage;sets up comparison
TopOfText ()
Pause ()
Let CurrentPage = GetWindowText (GetFocus (), false);saves new page
EndWhile;loop until the two pages are the same
Say ("That's all folks!", ot_status, false);for testing purposes
SwitchToScheme (sScheme2) ;Switches back from classic to LDLS scheme
Let g_ChapterAndVerseToggle = 1;turns on speaking of chapter and verse
EndScript
Thanks,
Dean
__________
Visit and contribute to The JAWS Script Repository http://jawsscripts.com
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts
Other related posts: