telnet script

Im trying to make a script to have terminal telnet into my schools server and enter the commands to get it into my mail box, how do i get it to wait for login and password and then enter pine and I later on in order to get it to enter my mail box, also i wish to make this an application later with interface builder, but for now a script would be fine. thanks in advance

Take a look at Apple’s response to this…

well isnt that a (b-word), now, as far as im concerned, applescript sucks and has no good use

im trying to get my script to take me to atleast the login point and im using

tell application “Terminal”
tell window 1
do script “telnet -K”
end tell
end tell

however, it opens terminal, a shell comes up, and then it opens another shell and does the telnet stuff, how can i have it open and do the script in the same window

Hmmm. A comment like this isn’t likely to encourage AppleScript devotees to help. :twisted:

– Rob

I can’t reproduce what you get. Every time the command is executed in the one and only window.

The only option I can think of that might make a difference is to target the script directly:

tell application "Terminal"
   do script "telnet blah blah blah" in window 1
end tell

Mine only does it in one window if terminal is already opened, if terminal isnt opened yet, it does it in two windows, and if i add “in window 1” after my do script action, i get…
Terminal got an error: NSArgumentEvaluationScriptError
and once i remove “in window 1” the error goes away