Checking whether a website has loaded completely
Checking whether a website has loaded completely
- Subject: Checking whether a website has loaded completely
- From: Peter Fischer <email@hidden>
- Date: Thu, 23 May 2002 22:29:32 +0200
Hi Scripters,
I'm currently scripting Internet Explorer to reload a website.
There's no problem with the reload, but I want to restore the scroll
positions of the window.
The following script works:
--------------------------------------------------------------------------------
tell application "Internet Explorer"
Activate
set XScroll to do script "document.body.scrollLeft" window 1
--> "115!
set YScroll to do script "document.body.scrollTop" window 1
--> "715"
do script "location.reload()" window 1
--> "undefined"
delay 5
do script "window.scrollTo(" & XScroll & "," & YScroll & ")" window 1
--> "undefined"
end tell
--------------------------------------------------------------------------------
The commented values under each line are the returned values.
The problem is that the script has to wait until the website has
loaded completely.
Then it will work to scroll to the stored positions.
How can I determine whether the site has loaded?
I've tried:
do script "window.captureEvents(Event.LOAD) window 1
but this returns no value!
--
Peter Fischer
Fischer-Bayern
"The source for german AppleScripters"
http://www.fischer-bayern.de
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.