Skip to content

Instantly share code, notes, and snippets.

@peterblazejewicz
Created May 10, 2011 12:55
Show Gist options
  • Save peterblazejewicz/964412 to your computer and use it in GitHub Desktop.
Save peterblazejewicz/964412 to your computer and use it in GitHub Desktop.
URL Access scripting: download a file using AppleScript
# 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
@thirtyjin
Copy link

can't run now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment