• 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
Detecting when URL has been loaded in Safari???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Detecting when URL has been loaded in Safari???


  • Subject: Detecting when URL has been loaded in Safari???
  • From: Dave <email@hidden>
  • Date: Tue, 29 Sep 2009 10:18:22 +0100

Hi All,

I have a script that open a Web Page, call it www.mydomain.com/ something. The requirement is to have only one Safari Window open to the "www.mydomain.com". My Script scans each window in Safari and closes windows that are set to "www.mydomain.com" if there is more than one open. All works well generally, but (why is there always a "but' ?!?), but the first time I run the Script I get two windows after my Script has ended. I think the reason is that the first URL is requested and the Script continues and exits, then it is called again before the first request has actually loaded into Safari, so it doesn't return the URL of the window that is loading and it opens a second window!

My question is this:

After doing this:

set myWIndow to (make new document with properties {URL: myURL})

is there any way to wait until this URL has 100% loaded before continuing?

Thanks in Advance.

All the Best
Dave



_______________________________________________ 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: "Mark J. Reed" <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: Philip Aker <email@hidden>
  • Prev by Date: Re: Setting the Front Window in Safari?
  • Next by Date: check alias
  • Previous by thread: Timed Out
  • Next by thread: Re: Detecting when URL has been loaded in Safari???
  • Index(es):
    • Date
    • Thread