Re: How to script Safari to download a file
Re: How to script Safari to download a file
- Subject: Re: How to script Safari to download a file
- From: Stephen Lanza <email@hidden>
- Date: Mon, 19 Jul 2004 15:11:19 -0400
On 07/18/04 1:00 AM, "email@hidden"
<email@hidden> wrote:
>
Date: Sat, 17 Jul 2004 07:32:32 -0400
>
To: email@hidden
>
From: email@hidden
>
Subject: Re: How to script Safari to download a file
>
>
Instead of using 'Safari', consider the code below.
>
>
----- Code starts here -----
>
>
set dateString to "dn" & (do shell script "date +%Y-%m%d") -- Get
>
'date's year, month, and day, and adds 'dn' before them.
>
set dateString02 to dateString & "-1_64kb.mp3" -- Get 'dateString'
>
and add '-1_64db.mp3' to end of it.
>
>
do shell script ("curl http://audio03.archive.org/3/audio/" &
>
dateString & "/" & dateString02 & " -o " & POSIX path of (((path to
>
desktop) as string) & dateString02))
>
>
----- Code ends here -----
>
>
Since it is now 17.07.2004 but only the 16.07.2004 '.mp3' file is
>
currently available - at the time of this reply - you may have to
>
temporarily comment out the 'set dateString ...' and add 'set
>
dateString to "dn2004-0716"', before the 'set dateString02 ...' line,
>
to test the above code.
>
--
>
>
SJWL
Thanks for the code. It worked great!
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.