• 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: How to save the Safari front window contents by script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to save the Safari front window contents by script


  • Subject: Re: How to save the Safari front window contents by script
  • From: Emmanuel <email@hidden>
  • Date: Sat, 3 Mar 2007 22:48:02 +0100

At 9:36 PM +0000 3/3/07, Nigel Garvey wrote:
Hi, emile. You can use Safari's 'do JavaScript' command to tell you when
the page has finished loading:

  tell application "Safari"
    repeat until ((do JavaScript "document.readyState" in front document)
is "complete")
      delay 0.2
    end repeat
  end tell

That's excellent, I think, but if this is to be called in a script just after loading the page I would advise inserting first a tiny delay because for a very short while after you've instructed Safari to load a new page it may first return "complete".


Emmanuel
_______________________________________________
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: 
 >Re: How to save the Safari front window contents by script (From: "Nigel Garvey" <email@hidden>)

  • Prev by Date: Re: How to save the Safari front window contents by script
  • Next by Date: Re: Print to PDF
  • Previous by thread: Re: How to save the Safari front window contents by script
  • Next by thread: Re: Filemaker waiting for AS
  • Index(es):
    • Date
    • Thread