login with a script

lethe

Registered
is it possible to get a script to log me in to, say, a telnet session? i had thought that something along the lines of
Code:
% telnet host <  script
might work. i would have login and pass as the first two lines, and then a list of commands to execute on the remote host.

it seems that i should be able to somehow convince telnet that is this file is actually STDIN. any thoughts?
 
AppleScript it thusly (note: this is *NOT* a real script, just a general outline):

tell application Terminal
_____open document
end tell

In this context, "document" represents the terminal session. If you use ScriptEditor.app, you should be able to record this script without any trouble. Also, since this message board wouldn't accept a tab or five spaces for the indent in the second line, I inserted underscores; this needs to be a tab in ScriptEditor.app.
 
Back
Top