「ご主人様ご命令を!」OS Xでスクリプトスレ
■ このスレッドは過去ログ倉庫に格納されています
00801
02/02/04 19:17ID:hljcaByY>>78
property Download_Folder : ""
property Command_Pass : ""
property Reffer_Flag : "No"
property Background_Flag : "No"
property Firstnumber_Flag : "No"
if Download_Folder is "" then
set Download_Folder to choose folder with prompt "ダウンロードファイルを保存するフォルダを指定してくれ"
set Download_Folder to POSIX path of Download_Folder
end if
if Command_Pass is "" then
set Command_Pass to choose file with prompt "連番ダウンロードスクリプトを選択してくれ"
set Command_Pass to POSIX path of Command_Pass
end if
set MainURL to the clipboard
set choiceList to {"簡単連番ダウンロード", "ユーザ定義ダウンロード", "ユーザ定義設定"}
set DownMethod to choose from list choiceList
set DownMethod to DownMethod as text
if DownMethod is "簡単連番ダウンロード" then
set Command_Str to Command_Pass & " " & MainURL
else if DownMethod is "ユーザ定義ダウンロード" then
set Option_Str to ""
if Background_Flag is "Yes" then set Option_Str to " -s "
if Reffer_Flag is "Yes" then
display dialog "HTTP Reffererを入力してください" default answer (the clipboard)
set Option_Str to Option_Str & "-r " & text returned of result & " "
end if
if Firstnumber_Flag is "Yes" then
display dialog "連番の最初の数字を入力してください" default answer "01"
set Option_Str to Option_Str & "-n " & text returned of result & " "
end if
set Command_Str to Command_Pass & " " & Option_Str & MainURL
else if DownMethod is "ユーザ定義設定" then
display dialog "HTTP Refeferを使用しますか?" buttons {"Yes", "No", "キャンセル"}
set Reffer_Flag to button returned of result
display dialog "バックグラウンドで使用しますか?" buttons {"Yes", "No", "キャンセル"}
set Background_Flag to button returned of result
display dialog "連番の最初の数字を指定しますか?" buttons {"Yes", "No", "キャンセル"}
set Firstnumber_Flag to button returned of result
return
else
return
end if
tell application "Terminal" to do script with command "cd " & Download_Folder & ";" & Command_Str
■ このスレッドは過去ログ倉庫に格納されています