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

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

Globals survive until the next JAWS restart, in case that helps any.

On Wed, Apr 22, 2015 at 09:47:38PM -0400, John Aaron wrote:
I tried the delay (20) and got the same thing.
The 20 is tenths of a second, so the 20 is only 2 seconds.

I can't think of any other way of doing the script because it all depends on
the server how long it takes to send the information to update the page.
During heavy use times I have seen it as much as 90 seconds. I have to try
to do it with a single script because I have information saved in variables
that I use at the end to process the information collected between the
screen updates.

The only other way I can think about doing this is to use global variables,
and then use an event handler and check the status of those when the script
fires, but I am not sure if the global variables are available after the
script terminates.




-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee
Sent: Wednesday, April 22, 2015 9:23 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Jaws reloading after script has run too long

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 __________o?=

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


__________???

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: