[jawsscripts] Re: Jaws reloading after script has run too long

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 22 Apr 2015 21:22:46 -0400

What happens if you use delay(20) rather than delay(20, True)? That
allows JAWS events to go through normally during the delays.

Other questions and possibilities:

How long have you ever seen that delay before the page loads? If it's
usually less than five seconds, I would recommend something more like
5 instead of 20 between polls, so the user's wait time is not extended
by up to two extra seconds.

Is it a good idea to use a scheduleFunction poll instead of a loop?
That would give JAWS back to the user while the script waits for the
page change, but I'm not sure if that's good or bad in your case. Two
minutes is a pretty long time to freeze a screen reader though. :-)

Finally, you may find that something like SayNonHighlightedText, or
its root, NewTextEvent, gets called when the page changes, with a
buffer of text you can recognize as the page change itself. If you can
key off that, you might not have to poll for this at all.

On Wed, Apr 22, 2015 at 07:40:35PM -0400, John Aaron wrote:
I am doing scripting in jaws 16, and I have written a script with a While
loop. The problem is the script could run for as much as 2 minutes without
interaction before completing, but after about 30 seconds jaws reloads, and
the script stops.
Here is a slight example of what I am doing:



Var

String oldPage,

String newPage,

Int iCounter



MoveToHeading (S_TOP, 1)

oldPage = GetLine ()

newPage = oldPage

EnterKey ()



While lastPage == newPage

;wait for new page to finish loading

Delay (20, true)

MoveToHeading (S_TOP, 1)

newPage = GetLine ()



;put in a safety net in case new page never loads

If iCounter >= 60 then

newPage = "Error"

EndIf



; increment once for every 2 seconds

iCounter = iCounter + 1



EndWhile



I think what the problem is that jaws thinks it is caught in an endless loop
and reloads after about 30 seconds. Is there anyway of overriding this?



Thanks in advance.



John



__________???

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts

--
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts

Other related posts: