• 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: Philip Aker <email@hidden>
  • Date: Wed, 12 Feb 2003 01:12:29 -0800

On Tuesday, February 11, 2003, at 09:38 AM, Michelle Steiner 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

I know. I just wanted to illustrate the logic from a UI scripting viewpoint.


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

JD has explained the direct call. With GUI Scripting, a method was explained a few weeks ago when the printing dialog was discussed and I think one could use the same kind of thing for a save dialog. You can use 'keystroke' to type in an alternate name to save the file under but I'm not sure how one would go about getting that dialog to navigate to the desired save folder.


Philip Aker
http://www.aker.ca
_______________________________________________
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.

References: 
 >Re: Saving a document in Safari (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Printing to PDF via GUI scripting
  • Next by Date: Re: Non Compulsory Parameters & a Null Constant?
  • Previous by thread: Re: Saving a document in Safari
  • Next by thread: Re: Saving a document in Safari
  • Index(es):
    • Date
    • Thread