Re: Detecting when URL has been loaded in Safari???
Re: Detecting when URL has been loaded in Safari???
- Subject: Re: Detecting when URL has been loaded in Safari???
- From: Dave <email@hidden>
- Date: Tue, 29 Sep 2009 14:29:51 +0100
Hi,
This doesn't work if the URL you set is changed once the page is
loaded, e.g.
In Safari goto "http://www.redmeat.com", once the page has loaded you
will see the URL is now set to "http://www.redmeat.com/redmeat/"
I got around this by using "starts with" on just the Domain Section.
This seems to work, but I think it will fail if the URL you go to is
redirected. What is needed here is a status field, then you could
write something like:
repeat while the status of the document of window 1 is busy
if TIME-OUT-PERIOD-REACHED then exit repeat
end repeat
I can't seem to find the JavaScript Version anywhere, but still looking!
I've been following this thread, and it's not just a matter of
looping with a delay, I did that just this week in fact. And what I
found is that it CAN return a value before the page is finished
loading. So your result can actually be incomplete even though
applescript has got a response.
What values did you see returned?
All the Best
Dave
On 29 Sep 2009, at 13:29, Wayne Melrose wrote:
On 29. sep. 2009, at 14.25, Mark J. Reed wrote:
How are you scanning? If the problem is what you think it is, then
simply loop until the URL of the new window returns what you just set
it to, with a small delay of course.
I've been following this thread, and it's not just a matter of
looping with a delay, I did that just this week in fact. And what I
found is that it CAN return a value before the page is finished
loading. So your result can actually be incomplete even though
applescript has got a response.
My fix was a little dirty, although it was just a simple job, and I
found a workaround.
But a more defined way of doing it would be great. I guess the
javascript is the best answer?
Wayne
_______________________________________________
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