在Applescript呼叫Terminal
利用wget 下載,如下
tell application "Terminal"
repeat with n from 1 to 5
do script with command "wget [url=http://www.xxx.org/bsd"]http://www.xxx.org/bsd"[/url] & 200+n &".jpg"
end
end tell
這樣會出現五個Terminal
請問要如何修改使所有的下載過程可以都在一個Terminal內
Really thanks
Applescript and Terminal
版主: ross_tt、bryanchang、digdog、chester
- bryanchang
- 討論區管理員
- 文章: 7057
- 註冊時間: 04/19/2001 1:01 am
- 來自: The '60s
- 聯繫:
Applescript and Terminal
寫一個 Shell script 去做下載 n 次的動作,然後用 AppleScript 去叫那個 shell script, 同時在參數列提供 n 的值。
Applescript and Terminal
xiKoun,
用 applescript 呼叫 Terminal, 每一個呼叫會開一個新 Terminal.
So, with unix, try :
1. 修改 unix command, do the download in one script in one time.
2. 用 "do shell script"*, if 用 applescript 1.8.1.
without unix, try :
3. 用 URL Access Scripting.
4. 用 "open location".
* do shell script uses the sh shell, which is different than the default tcsh shell used in the Terminal.
用 applescript 呼叫 Terminal, 每一個呼叫會開一個新 Terminal.
So, with unix, try :
1. 修改 unix command, do the download in one script in one time.
2. 用 "do shell script"*, if 用 applescript 1.8.1.
without unix, try :
3. 用 URL Access Scripting.
4. 用 "open location".
* do shell script uses the sh shell, which is different than the default tcsh shell used in the Terminal.