Try this:
tell application "Google Chrome"
set theURL to URL of active tab of window 1
end tell
do shell script "curl --remote-name '" & theURL & "'"
The string concatenation operator in AppleScript is &
, and you don't put ${...}
around variables.
This will run curl
in the background, there's no need to open a terminal. The --remote-name
option tells it to write the result to a file named like the filename part of the URL.