views:

33

answers:

1

I would like to control mac osx terminal via applescript as follows:

  • when I press Command-N, I get a new terminal session for localhost (as usual)

  • when I press Command-Shift-N, I open a new terminal session with a different background color, with an ssh session to a machine (with config specified in ~/.ssh/config)

How do I accomplish this using applescript ?

A: 

My interaction with the Terminal is limited, but there is an open command that requires pointing to a file (untested code follows):

tell application "Terminal"
    open "/path/to/file"
end tell
Philip Regan