Yes, I'm having a terrible newbie experience with Apple Script.

I need to open a new Terminal window in the current desktop space. NOT move me to another space which has a Terminal running and then open another Terminal window.

Of course, if Terminal is not running then it should start a new Terminal process.

link|improve this question

50% accept rate
feedback

2 Answers

up vote 1 down vote accepted
tell application "Terminal"  
    do script " "  
    activate  
end tell

It seems weird but it takes advantage of an oddity in how Terminal handles incoming "do script" commands; it creates a new window for each one. You could actually replace that with something useful if you want; it'll execute whatever you want just after opening the new window.

link|improve this answer
Thank you very much! I'm just happy that it does what I want. – zaf Nov 11 '10 at 15:00
feedback

If you don't have any text in-between the do script " " you won't get an extra command prompt in the terminal.

tell application "Terminal"  
    do script ""  
    activate  
end tell
link|improve this answer
I think it's okay if we leave it as an answer – you could alternatively suggest an edit on @jfm's answer to further improve it and delete yours. – slhck Nov 29 '11 at 20:55
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.