我无法弄清楚Applescript代码在两个窗口中运行两个不同的shell脚本。
到目前为止我得到的是......
set s1 to "echo A"
set s2 to "echo A"
tell application "Terminal"
activate
tell window 0
set visible to true
end tell
set shell to do script s1 in window 0
tell window 1
set visible to true
end tell
set shell to do script s2 in window 1
end tell
但这会在一个窗口中显示所有内容。这让我很生气,请帮忙!
答案 0 :(得分:1)
默认情况下do script
不会打开新窗口吗?
tell application "Terminal"
activate
do script "echo A"
do script "echo A"
end tell