applescript simple file download
Imported from the Apple Support Forums via the Wayback Machine 🔗
hi, after a long long time of figuring out how to post a topic, i hope is not in the wrong spot.
i am simply trying to do a script that downloads a file from the internet.
(start applescript)
display dialog "Download url" default answer "" buttons {"Cancel", "Download"} default button 2
set x to text returned of the result
set p to "/Users/Sacalito/Downloads"
set the Downloads to p as file specification
set thisfileSRC to "x"
tell application "URL Access Scripting"
download file to Downloads replacing yes
end tell
(end applescript)
but i cant figure out how to also put an input text asking for the name of the file that will be saved, and it gives me and error ... Can’t make "/Users/Sacalito/Downloads/" into type file specification.
so i just want the window with the input for the URL
and the input for the name of the file
the download directory is on downloads folder
and the download button to download file
9 replies
Sign in or join Beachball Help to reply.
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0