[jawsscripts] Re: Webpage Fully Loaded

  • From: "Donald Marang" <donald.marang@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 18 Feb 2010 17:07:45 -0500

There are a couple of functions that should provide status on the loading of 
web pages.  The loop code below is an example where I used both functions. 
I currently went to a more robust way to halt my script until the page was 
loaded and move to an event driven method.  To be fair, this method seemed 
to fail if the new page was loaded before the loop ever started.


Let iWait = 0
While (GetDocumentLoadState (GetCurrentWindow ()) != DocState_Loaded
&& iWait < MAX_WAIT )
        Delay (1)
        If ! ( iWait % 10 ) Then ; will say the loop counter every 10th time, 1 
second plus processing time
                ; SayInteger (GetDocumentLoadState (GetCurrentWindow ()) )
                SpeakProgressBarInfo (False, True)
        EndIf
        Let iWait =iWait + 1
EndWhile
If iWait >= MAX_WAIT Then
        SayMessage (OT_ERROR, "Page could not finish loading!")
        Return False
EndIf

Don Marang

--------------------------------------------------
From: "Tony" <tonys_groups@xxxxxxxxxxxxxx>
Sent: Thursday, February 18, 2010 11:43 AM
To: <jawsscripts@xxxxxxxxxxxxx>
Subject: [jawsscripts] Webpage Fully Loaded

> Hi
>
> How would one tell that a webpage is fully loaded after issuing a refresh
> within a jaws script pleas?
>
> Would the best way be to read the status line?
>
> Thanks for any advice.
>
> T
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //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 
//www.freelists.org/list/jawsscripts

Other related posts: