hello everyone so after many hours (i m justa a begennir with apple script)
i put toghether a script to download video with youtube dl or aria2c.
i need help regarding aria,i want the apple script to ask for a name and then pass it to "do shell script aria etc etc "
here s my code but the varianble “w” is not corrctly interpreted by aria it stays w!!
code:
set currentURL to the clipboard
if currentURL contains “youtube” then
tell application “Finder” to set homeFolder to path to home folder
do shell script “/usr/local/bin/youtube-dl -x --audio-format mp3 -o "” & POSIX path of homeFolder & "Desktop/%(title)s.m4a" --ffmpeg-location /usr/local/bin/ffmpeg " & currentURL
do shell script "/usr/local/bin/node /usr/local/lib/node_modules/osx-notifier/bin/osx-notifier.js --type pass --title "Video Download" --subtitle "Video download successful" --message " & quoted form of currentURL
else
display dialog “Password” default answer “”
set w to text returned of the result
tell application “Finder” to set homeFolder to path to home folder
do shell script "/usr/local/bin/node /usr/local/lib/node_modules/osx-notifier/bin/osx-notifier.js --type info --title "w" --subtitle "New video download started" --message " & quoted form of w
do shell script “/usr/local/bin/aria2c -j 16 -x 16 -s 8 -k 1M -o "” & POSIX path of homeFolder & "Desktop/w.mp4" " & currentURL
do shell script "/usr/local/bin/node /usr/local/lib/node_modules/osx-notifier/bin/osx-notifier.js --type pass --title "Video Download" --subtitle "Video download successful" --message " & quoted form of currentURL
end if