I'm trying to create a simple workflow to type commands into an open Terminal window that has focus. I want to run the script when I give a dictation command with Terminal open.

I created a simple workflow to run a shell command to test this out. It runs, but doesn't do anything inside the open terminal window. How I can achieve this?

enter image description here

1 Answer 1


OK, I created an AppleScript inside automator that did the trick:

tell application "Terminal"
    set currentTab to do script ("ssh [email protected];") in front window
end tell

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .