Telnet interface

I am work on creating a AppleScript to have a user enter there user name and there password and then be able to login to telnet.

This is what I have so far. How to I get the user name to be passed to terminal?

Tell application “System Events”
try
tell application “System Events” to display dialog “Please enter your User Name” default answer “User Name”
set the_result to the result
set shortName to text returned of the_result

	tell application "System Events" to display dialog "Please input New Password" default answer "password"
	set the_result to the result
	set pass to text returned of the_result
end try

end tell
set serverAddress to “server”
tell application “Terminal”
activate
do script "telnet " & serverAddress
do script "& shortName "
end tell

Hello!

I’ll advice you to try entering all the parameters at once with the telnet command first at the terminal prompt.

You’l combine the parameters taken on the commandline by telnet into one do script line.

Then we’ll deal with whatever isn’t taken by telnet from the commandline later.

would I write this line do script "telnet " & serverAddress
to be able to include user and pass?

Hello!

You should really have a look at the telnet man page!

Try writing man telnet in a terminal window!