Re: How do I pause a script to allow a webpage to load and then resume the script?
Re: How do I pause a script to allow a webpage to load and then resume the script?
- Subject: Re: How do I pause a script to allow a webpage to load and then resume the script?
- From: "email@hidden" <email@hidden>
- Date: Sun, 13 Dec 2009 17:33:46 -0800
It is the 5th line (the delay line) I would like to modify. I would like it to say in essence: "wait until the page has finished loading"
This is what I use (derived from a thread on this list a while back):
set artnum to 0 tell application "Safari" to set URL of front document to thisURL delay 1 repeat with i from 1 to 60 tell application "Safari" to set docLoadingState to do _javascript_ "document.readyState" in document 1 if docLoadingState = "complete" then exit repeat --the page has successfully loaded else delay 1 end if end repeat
HTH
ES |
_______________________________________________
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