Created
May 10, 2011 12:55
-
-
Save peterblazejewicz/964412 to your computer and use it in GitHub Desktop.
URL Access scripting: download a file using AppleScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# destination as file path | |
set destination_file to ((path to desktop as string) & "myImage.jpg") as string | |
# source as url string | |
set source_file_url to "http://www.nasa.gov/images/content/180842main_access-lca.jpg" | |
# start download - it returns reference to a file if created | |
tell application "URL Access Scripting" | |
download source_file_url to destination_file replacing yes | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can't run now