0

It seems like the recent Mavericks update has broken the keystroke command in applescript -- whenever my script reaches that point, it freezes. (I currently have ~20 zombie osascript processes...)

Furthermore, there isn't anything in the accessibility options to allow applescripts to automate keystrokes.

This is my script currently.

tell application "Terminal"
    activate
end tell
delay 0.1
tell application "System Events" to tell process "Terminal"
    keystroke "t" using command down
end tell
tell application "Terminal"
    do script "cd ~/some_folder_here" in front window
end tell

If there's a way to tell terminal to directly open a tab (or if iterm 2 can do that) that could also be a solution.

  • Just tried your AppleScript here on 10.9.4 and it successfully brings Terminal to the foreground and opens a new tab. – Alistair McMillan Jul 25 '14 at 1:25
0

It turns out that the System Events process on my machine was frozen (which I discovered after a node process refused to be killed). Performing a full restart fixed the problem.

You must log in to answer this question.

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