• 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
How to script Safari to download a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to script Safari to download a file


  • Subject: How to script Safari to download a file
  • From: Stephen Lanza <email@hidden>
  • Date: Fri, 16 Jul 2004 15:35:45 -0400

I download an audio file from a webpage each day and would like to automate
the process.

I can use the following script to get the audio file to play on a web page
but I want to download the file instead of playing it.

tell application "Safari"
activate
if not (exists document 1) then
make new document at the beginning of documents
end if
set the URL of the front document to
"http://www.archive.org/download/dn2004-0716/dn2004-0716-1_64kb.mp3";
end tell

Basically, I want to save the file as if I control clicked on the url and
selected the 'Download linked file as ...' command

If anyone can point me in the right direction on this, I would appreciate
it.

Thanks.

Stephen Lanza
Software Complement
_______________________________________________
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.


  • Prev by Date: Re: Record Access OSA by Ed email@hidden
  • Next by Date: Re: Filemaker
  • Previous by thread: Exporting XML in InDesign CS
  • Next by thread: Re: How to script Safari to download a file
  • Index(es):
    • Date
    • Thread