(* Freeware AppleScript from WhatsMyIP.org © 2018 Check out our other scripts! @ http://www.whatsmyip.org/lib/applescripts/ *) on run set my_url to text returned of (display dialog "Enter the direct URL of a file to download it to your desktop..." buttons {"Download...", "Cancel"} default button 1 with icon note default answer "") if (my_url = "") then display dialog "You did not enter a URL into the previous dialog box." buttons {"OK"} default button 1 with icon stop error number -128 end if set my_useragent to "\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15\"" try set curl_response to do shell script "cd ~/Desktop; curl -f -s -S -O -L -A " & my_useragent & " " & my_url on error errStr number errorNumber display dialog "An error occured" & return & "(" & errorNumber & ") " & errStr & return buttons {"OK"} default button 1 with icon stop error number -128 end try display dialog "File download is complete." & return & return & "©" & (year of (current date)) & " WhatsMyIP.org" buttons {"OK"} default button 1 with icon note end run