Re: Waiting for a web page to be fully loaded
Re: Waiting for a web page to be fully loaded
- Subject: Re: Waiting for a web page to be fully loaded
- From: Laine Lee <email@hidden>
- Date: Fri, 23 Apr 2010 12:14:01 -0500
- Thread-topic: Waiting for a web page to be fully loaded
Title: Re: Waiting for a web page to be fully loaded
> For that reason I'm trying to use the code below which resort (taken from
> somewhere in the internet) to the "do _javascript_" command. To no avail. I
> mean that the code runs but invariably passes the test of the repeat line
> without looping thru the "delay 1" line even though the web page is still
> being loaded.
Because we're already using GUI Scripting, here's a little interface chicanery. I couldn't find a way to keep a Safari doc window from showing a grow box. If it can, or if the interface is otherwise disturbed, then this could fail.
tell application "Safari"
make new document at end of documents
set URL of document 1 to "http://192.168.1.254/xslt"
activate
end tell
repeat
delay 1
tell application "System Events"
tell process "Safari"
click grow area 1 of window 1
set s to (enabled of (menu item "Stop" of menu 1 of menu bar item "View" of menu bar 1))
if s is false then
exit repeat
end if
end tell
end tell
end repeat
activate
display dialog "Loading complete."
Laine Lee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden