Created
February 13, 2012 21:17
-
-
Save mrkmg/1820572 to your computer and use it in GitHub Desktop.
AXEL Apple Script
This file contains 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
--Written by Kevin Gravier | |
--Edit and redistribute as you please but leave this header. | |
property lastURL : "http://link.to.file" | |
property lastThreads : 4 | |
set link to text returned of (display dialog "What do you want to download?" buttons {"OK"} default button 1 default answer lastURL with icon 1) | |
set lastURL to link | |
set threads to text returned of (display dialog "How many threads?" buttons {"OK"} default button 1 default answer lastThreads with icon 1) | |
set lastThreads to threads | |
set diralias to choose folder with prompt "Choose a folder to save the file" | |
set dir to POSIX path of diralias | |
tell application "Terminal" | |
do script "cd " & dir & ";/opt/local/bin/axel -a -n " & threads & " " & link | |
set the background color of window 1 to "green" | |
set the normal text color of window 1 to "black" | |
set the number of columns of window 1 to 80 | |
set the number of rows of window 1 to 6 | |
set the position of window 1 to {0, 20} | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment