• 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: "email@hidden" <email@hidden>
  • Date: Tue, 29 Sep 2009 09:07:34 -0700



Except you get an infinite loop if the window happens to already be on
www.redmeat.com. :)


Good point, it would also fail if the home page redirects. This fixes both:


tell application "Safari"
	activate
	set myWIndow to make new document at beginning with properties {URL:""}
	set newURL to URL of myWIndow
	set URL of document 1 to "http://www.redmeat.com";
	repeat
		if URL of document 1 is not newURL then exit repeat
		delay 1
	end repeat
end tell

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

  • Prev by Date: Re: Detecting when URL has been loaded in Safari???
  • 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