[jawsscripts] ScheduleFunction

How is the ScheduleFunction used? If it is only to let a function be run 
after a certain time why not just put a delay then the function?

The following is to read a screen of text then go to the next screen and 
continue reding until the end of the text or until a key is pressed. It will 
read but then skip a page or two before reading again. someone suggested the 
ScheduleFunctionn might help here. Any suggestions how?

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

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 to go to next screen

; Pause ()

Delay (3, false)

Say ("next page", ot_status, false); for testing purposes

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 ();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

PCToText ();function I wrote to make sure the PC and JAWS cursors start out 
in the text area

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: