Two windows ot tabs in Terminal.app

Hello,
I have a totaky newbie question.
I need make part of my work automatical.
So I need open 2 windows (and leave open for manual entry) or tabs (on Leopard) in terminal app like this:


tell application "Terminal"
	activate
	tell window 1
		set custom title of window 1 to "SSH to <host>"
		do script "......" in window 1
	end tell
	tell window 2
		set custom title of window 2 to "SFTP to <host>"
		do script "......" in window 2
	end tell
end tell

But it not work. Terminal also not accept phase:


tell application "Terminal"
	activate
	make new window
end tell

Could you help me?

Thank you.

Model: iMac
AppleScript: 2.0
Browser: Safari 525.18
Operating System: Mac OS X (10.5)

Hi ferite,

It seems that you cannot make new windows, but the Terminal application will create a new one if you do not specify a certain window for the «do script» command:


tell application "Terminal"
	do script "ls -a"
	set custom title of window 1 to "Yeah!"
	do script "ls -a"
	set custom title of window 1 to "Cool!"
end tell

This code works just fine on my machine.

Model: iMac
Browser: Safari 525.13
Operating System: Mac OS X (10.5)

Thank you works fine. But when Terminal.app starts one window was opened automatically.
Ant the other thing is Tabs - great feature in Leopard but not scriptable - I’m confused.