0

I can't figure out the Applescript code to run two different shell scripts in two windows.

What I got so far is...

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

But this displays everything in one window. This is pissing me off, please help!

1 Answer 1

1

Doesn't do script open a new window by default?

tell application "Terminal"
    activate
    do script "echo A"
    do script "echo A"
end tell
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.