• 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: "Nigel Garvey" <email@hidden>
  • Date: Sat, 3 Mar 2007 21:36:22 +0000

email@hidden wrote on Sat,  3 Mar 2007 14:37:41 +0100 (CET):

>In the mean time (between the mail sent time and your answers), I realized
>that I need to add a timing (wait) between sending the URL requests to
>Safari and the moment I save the document to disk: I saved nth time the
>'nearly the same' file. But, a simple search in the
>AppleScriptLanguageGuide.pdf gives me the "delay" command. Now, I have to
>make some testings to get a proper wait time (delay to get hte asked
>document from the Yahoo file server).

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


NG

 _______________________________________________
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: How to save the Safari front window contents by script
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Print to PDF
  • Next by Date: Re: How to save the Safari front window contents by script
  • Previous by thread: Re: How to save the Safari front window contents by script
  • Next by thread: Re: How to save the Safari front window contents by script
  • Index(es):
    • Date
    • Thread