Hi Dean, I have not followed this thread, but take the problem to be that the function that you have scheduled to fire, fires again when you wish it to cease. The ScheduleFunction call setts up a timer to fire the nominated function when the timer elapses. If I have not misunderstood the problem, then perhaps you need to use the UnScheduleFunction to terminate the pending call of the function. That pending call of the nominated function can *only* be terminated, or prevented, by using the UnScheduleFunction function. To do this, you need to store the internal identifier of the scheduled call, with something like this: LET Global_ScheduleIdentifier = scheduleFunction ("PositionForNextRead", 200) then where your code recognises that the scheduling should stop, use: UnScheduleFunction (Global_ScheduleIdentifier) This will cause any pending call to the nominated function to be cancelled. Note: the variable Global_ScheduleIdentifier, stores an integer which is unique to the function that is to be called, & not to the actual call. i e. if your code has more than one ScheduleFunction call to one nominated function, then all those ScheduleFunction calls will generate the same identifier. Hope this helps. Paul from Aust ----- Original Message ----- From: "Dean Masters" <dwmasters@xxxxxxxxxxxxx> 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