0

我无法弄清楚 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

但这会在一个窗口中显示所有内容。这让我很生气,请帮助!

4

1 回答 1

1

默认不do script打开新窗口?

tell application "Terminal"
    activate
    do script "echo A"
    do script "echo A"
end tell
于 2012-09-28T18:13:04.570 回答