Re: Telnet Automation in OSX

2002-02-09 Thread hinchlif

On Friday, February 8, 2002, at 02:26 PM, Scott wrote:

 Is terminal scriptable?

Looking at Terminal's AppleScript dictionary it's pretty meagre for what 
you want to do. However, it does have doscript which allows you to run 
a UNIX shell script from within Terminal.

--
Peter Hinchliffe
Apwin Computer Services FileMaker Pro Solutions Developer
Perth, 
Western Australia Phone (618) 9332 6482 Fax (618) 9332 0913

Mac because I prefer it -- Windows because I have to.


[Non-text portions of this message have been removed]



Telnet Automation in OSX

2002-02-08 Thread Scott
Hi all,

Wondering if anyone knows how to automate telnet in OSX?

I made this apple script for 9. And then used chronotask to Reload it every
8 hours.

I need something that will log me in every 8 hours. And if the previous
session is active to logout first.

This is my old script

property MyUserName :  -- substitute your log-in name here
property MyHost :  -- substitute your connection host here
property MyPass : *** -- substitute your password here

on run
tell application MacTelnet
connect to MyHost name my automatically-logged-in connection
delay 3 -- give the connection a chance to open
copy connection 1 to my_connection
-- send AYT to my_connection -- sends ³are you there?²
-- wait for [Yes]
send MyUserName to my_connection with newline -- substitute your
user name here
delay 2 -- give the connection a chance to display pass prompt
send MyPass to my_connection with newline
delay 5 -- give the connection a chance to think
end tell
end run

Is terminal scriptable?

Regards,
Scott Palmer 


[Non-text portions of this message have been removed]



Re: Telnet Automation in OSX

2002-02-08 Thread Onno Benschop

At 14:26 8/02/02 +0800, Scott wrote:

Wondering if anyone knows how to automate telnet in OSX?


[Applescript solution deleted]

You're now running a computer with a real operating system, so you can use 
real tools - things like shell scripts :-)


You could do something *like* this in a shell script; it will loop forever 
and wait until the telnet terminates, then starts it again:


while [true] ; do
telnet
wait
done

What I'm really wondering is what you're attempting with a constantly open 
telnet session. Unless both machines are behind the same firewall and 
you've got control over both and the rest of the network, I wouldn't be 
using telnet in this day and age.

--
()/)/)()..ASCII for Onno..
|?  ..EBCDIC for Onno..
--- -. -. ---   ..Morse for Onno..

ITmaze - ABN: 56 178 057 063 - ph: 04 1219  - [EMAIL PROTECTED]