• 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: KOENIG Yvan <email@hidden>
  • Date: Sat, 3 Mar 2007 14:51:04 +0100




[1] Both code have its own trouble while executed here. But they lead me to search how to get the document name. I remembered that I found it easely with Netscape... and fall into the code to save the document source (what I wanted) without dialog.


Yvan code:
Error in System Events:
NSReceiverEvaluationScriptError: 4

I get the save as sheet dialog, AppleScript Text Editor open, behind.

Malcom code: does not return the title (document.title returns an empty string)



Hello Emile

I'm a bit surprised because on my machine it works flawlessly.

In my first attemps, I forgot the
tell application "Safari" to activate
and so, as I was executing from the Script Editor, Safari was not "at front".


With the added instruction, Safari is put at front and so the script correctly saves the site contents.

Yvan KOENIG

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

  • Prev by Date: How to save the Safari front window contents by script
  • Next by Date: Re: Print to PDF
  • Previous by thread: 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