[jawsscripts] Re: TopOfText
- From: Johannes Grib <johannesg@xxxxxxxxx>
- To: "jawsscripts@xxxxxxxxxxxxx" <jawsscripts@xxxxxxxxxxxxx>
- Date: Thu, 23 Apr 2009 09:08:20 +0200
Hello Dean,
You use && "and" which means both conditions must test true.
Try || "or", which will work if either one condition test true.
HTH
Johannes
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Dean Masters
Sent: Wednesday, April 22, 2009 10:37 PM
To: JAWS Scripts
Subject: [jawsscripts] TopOfText
here is the function I have been getting help on. The scheduled function
still goes on even when I have hit a key to stop the reading. I don't know
why something doesn't trigger when a key is pressed to stop the scheduled
function.
Also the scheme is not switched from the default after going to the next
screen. I have tried moving the lines of code below the keystroke to move to
the next screen and also to the function that is scheduled. None of these
effect the scheme and reading of the reference which is supposed to be
turned off.
Void Function TopOfText ()
VAR
string LastLine,
Int iKeyWasPressed, ;use this to terminate the while loop.
string sScheme,
string sScheme1,
string sScheme2
Let iKeyWasPressed = IsKeyWaiting () ; set variable to true if a key was
pressed.
If iKeyWasPressed then
Return ; get out before starting process and while loop
EndIf
InvisibleCursor ()
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
ElIf iKeyWasPressed ==0 then
SayLine ()
Let LastLine = CurrentLine; sets up for new comparison
NextLine ();scrolls down one line
Let CurrentLine = GetLine (); saves the new line
EndIf
EndWhile;loop until the two lines are the same
Say ("Bottom of page", ot_status, false); for testing purposes
If iKeyWasPressed then
Let sScheme = GetCurrentSchemeName ();scheme set for sounds which is to be
turned off for this script
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
Return
Else
PCCursor ()
TypeKey ("spacebar");new keystroke in Libronix 3c to go to next screen
Say ("next page", ot_status, false); for texting
scheduleFunction ("PositionForNextRead", 200)
EndIf
EndFunction
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
__________
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: