How do I download a URL using Applescript
set the URLs to the text returned of (display dialog "Enter the URLs you would like to download. If you have more than one, separate them with commas please:" default answer "")
set the destination to (choose folder with prompt "Choose the folder you want to download the URLs to:")
set AppleScript's text item delimiters to ","
repeat with this_URL in the URLs
    tell application "URL Access Scripting" to download this_URL to the destination with progress and unpacking
end repeat
set AppleScript's text item delimiters to ""


If you are using Lion, the above code won't work (Apple removed URL Access Scripting for some reason). Use the shell command curl instead, as shown below:

set the URLs to the text returned of (display dialog "Enter the URLs you would like to download. If you have more than one, separate them with commas please:" default answer "")
set the destination to (choose folder with prompt "Choose the folder you want to download the URLs to:")
set AppleScript's text item delimiters to ","
repeat with this_URL in the URLs
      do shell script "curl -L " &amp; this_URL &amp; " -o " &amp; POSIX path of the destination 
end repeat
set AppleScript's text item delimiters to ""