Error on simple script to open new tab I am trying to run a simple script which simply opens a new tab, but am getting execution error: An error of type -10810 has occurred. (-10810)
I am running on Yosemite.

This is the script:

#!/usr/bin/osascript

tell application "Terminal"
    activate
    tell application "System Events" to keystroke "t" using command down
    delay 2 
end tell
Try this:

tell application "Terminal"
    if not (exists window 1) then
        reopen
    else
        do script ""
    end if
end tell