• 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: Saving a document in Safari
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving a document in Safari


  • Subject: Re: Saving a document in Safari
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 11 Feb 2003 10:38:52 -0700

On Tuesday, February 11, 2003, at 03:26 AM, Philip Aker wrote:

--Here's an alternative to the previous low level stuff:

tell application "System Events"
tell process "Safari"
set frontmost to true
tell menu bar 1
tell menu "File"
click menu item "Save As..."
end tell
end tell
end tell
end tell

You can do that in one line:

tell application "Safari" to save the front window

The problem with both of those is that they invoke the save dialog, so the save is not fully automated.

Safari's dictionary says that an optional parameter of save is "in" which takes Unicode text as the destination of the save. Unfortunately, it doesn't work, and generates an error. Likewise if you specify a file as the parameter, it also generates an error. Of course, if you specify an alias, it says that the target file does not exist.

--Michelle

--
"There's some good in the world, Mr. Frodo, and it's worth fighting for."
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Saving a document in Safari
      • From: Philip Aker <email@hidden>
    • Re: Saving a document in Safari
      • From: John Delacour <email@hidden>
References: 
 >Re: Saving a document in Safari (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Saving a document in Safari
  • Next by Date: on "do shell script"
  • Previous by thread: Re: Saving a document in Safari
  • Next by thread: Re: Saving a document in Safari
  • Index(es):
    • Date
    • Thread