How do I pause a script to allow a webpage to load and then resume the script?
How do I pause a script to allow a webpage to load and then resume the script?
- Subject: How do I pause a script to allow a webpage to load and then resume the script?
- From: Jeffrey L.Porrello <email@hidden>
- Date: Sun, 13 Dec 2009 13:12:05 -0800
Note: Safari is already active with no open windows.
The script:
activate application "Safari" set artnum to 0 repeat 1000 times delay 10 get name of 1st window of application "Safari" if result is ... then ... ... ... ... ... ... ... ... ... ... ... end if set artnum to artnum + 1 end repeat
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"
DOES ANYONE KNOW HOW TO DO THIS???
You get the idea. Instead of using a fixed delay of "x" number of seconds, I would prefer a way to pause just long enough for the page to finish loading before moving on with the script. This would prevent the problems that crop up when a page hasn't fully loaded before being passed on to the filtering stage of the script. It would also speed things along since most pages load in less, rather than more time.
Any help would be greatly appreciated
Jeff P. |
_______________________________________________
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