• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detecting when URL has been loaded in Safari???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Detecting when URL has been loaded in Safari???
      • From: "email@hidden" <email@hidden>
References: 
 >Detecting when URL has been loaded in Safari??? (From: Dave <email@hidden>)
 >Re: Detecting when URL has been loaded in Safari??? (From: "Mark J. Reed" <email@hidden>)
 >Re: Detecting when URL has been loaded in Safari??? (From: Wayne Melrose <email@hidden>)

  • Prev by Date: TextEdit window not marked as changed
  • Next by Date: Re: check alias
  • Previous by thread: Re: Detecting when URL has been loaded in Safari???
  • Next by thread: Re: Detecting when URL has been loaded in Safari???
  • Index(es):
    • Date
    • Thread