Hi.
Do you know KixTart at all? There is a function in KixTart called "Sendkeys". This can be used in conjunction with KixTarts "Setfocus" fintion to achieve what you are wanting to do.
An example of the KixTart script would look something like this to send a mail message using Telnet and command line:
run "telnet Servername 25"
SetFocus("c:\WINNT\System32\cmd.exe")
sleep 5
SendKeys("HELO")
Sendkeys("{ENTER}")
sleep 1
Sendkeys("MAIL FROM: ")
Sendkeys("{ENTER}")
sleep 1
Sendkeys("RCPT TO: ")
Sendkeys("{ENTER}")
sleep 1
Sendkeys("DATA")
Sendkeys("{ENTER}")
sleep 1
Sendkeys("Helloo from the batch file!")
Sendkeys("{ENTER}")
sleep 1
Sendkeys(".")
Sendkeys("{ENTER}")
;Sendkeys("{ENTER}")
Sendkeys("Quit")
Sendkeys("{ENTER}")
I have tested this and it works well. You can modify it to suite your needs. If you need more help with Kixtart, give me a shout, or go to http://kixtart.org
Hope this helps you.
Regards.
Duwane