Terminal.app vs. iTerm, Round II

A lot of water has passed beneath the bridge since I wrote my last entry about Apples Terminal.app vs. iTerm. Apple has released Snow Leopard with, among other things, a much improved version of Terminal.app, which has gotten me to ditch iTerm again.

So, I bring to you a version of the script for opening a new terminal window on the currently active desktop space – the Terminal.app way:

tell application "System Events"
	set TerminalCount to (count (every process whose name is "Terminal"))
end tell

if (TerminalCount is not 0) then
	tell application "Terminal"
		do script
		activate
	end tell
else
	tell application "Terminal"
		activate
	end tell
end if

As usual: Save the script to a .scpt file, open it with Script Editor, save as an Application and place a shortcut in your Dock.

Leave a Reply

Your email address will not be published. Required fields are marked *