BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to know something be sent while telnet automatically

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Peer Liu
Guest





PostPosted: Tue Oct 28, 2003 2:18 pm    Post subject: How to know something be sent while telnet automatically Reply with quote



Hi all,

I'd like to write a program to telent a SUN system and execute some UNIX
commands automatically with pre-defined user name/password and some
commands, means I want my program to be interactive with server for end
users.
But I have a trouble that how can I know whether the UNIX box has finished
executing last command and then wait a new command?

I try to use 'GA' option of telnet protocol, but there is no any 'GA' sent
from server even I diabled the 'SGA' option.

Does anyone know how to do?
Thanks.

Regards,
Peer


Back to top
Francois Piette
Guest





PostPosted: Tue Oct 28, 2003 3:12 pm    Post subject: Re: How to know something be sent while telnet automatically Reply with quote



Quote:
But I have a trouble that how can I know whether the UNIX box has finished
executing last command and then wait a new command?

Check that you get the user prompt back
ICS has a component TTnScript which can help implement your scripting. It
triggers an event when a given string is received in input stream. Download
full source code from http://www.overbyte.be

--
[email]francois.piette (AT) overbyte (DOT) be[/email]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be



"Peer Liu" <peer_liu (AT) hotmail (DOT) com> a écrit dans le message de
news:3f9e7d1a$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hi all,

I'd like to write a program to telent a SUN system and execute some UNIX
commands automatically with pre-defined user name/password and some
commands, means I want my program to be interactive with server for end
users.
But I have a trouble that how can I know whether the UNIX box has finished
executing last command and then wait a new command?

I try to use 'GA' option of telnet protocol, but there is no any 'GA' sent
from server even I diabled the 'SGA' option.

Does anyone know how to do?
Thanks.

Regards,
Peer





Back to top
Peer Liu
Guest





PostPosted: Tue Oct 28, 2003 3:23 pm    Post subject: Re: How to know something be sent while telnet automatically Reply with quote



"Francois Piette" <francois.piette (AT) overbyte (DOT) be> wrote

Quote:
But I have a trouble that how can I know whether the UNIX box has
finished
executing last command and then wait a new command?

Check that you get the user prompt back
ICS has a component TTnScript which can help implement your scripting. It
triggers an event when a given string is received in input stream.
Download
full source code from http://www.overbyte.be

--
[email]francois.piette (AT) overbyte (DOT) be[/email]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


But I have some commands with parameters to be provided, so at such
situation, there will no user prompt. Morever, I hope my program to be
general, not for specific commands.



Back to top
Francois Piette
Guest





PostPosted: Tue Oct 28, 2003 3:48 pm    Post subject: Re: How to know something be sent while telnet automatically Reply with quote

Quote:
But I have a trouble that how can I know whether the UNIX box has
finished executing last command and then wait a new command?

Check that you get the user prompt back
ICS has a component TTnScript which can help implement your scripting.
It
triggers an event when a given string is received in input stream.
Download full source code from http://www.overbyte.be

But I have some commands with parameters to be provided, so at such
situation, there will no user prompt.

Yes, but the application will have some kind of prompt. With TTnScript, you
can have several strings to watch for and dynamically change those strings.
I wrote it to automate Unix applications and it works well. This kind of
scripting is the best way to automate a unix application made for an
interactive user. Another way is to use another ICS component TTnEmulVT
which is a complete telnet emulation with an ansi/vt100 screen. With it you
are able to peek at the screen to see if the remote application wrote this
or that information here and threre on the screen. This works well with
character mode, windows like applications while TTnScript works well for
command line tools with simple user prompt.

--
Contribute to the SSL Effort. Visit
http://overbyte.delphicenter.com/eng/ssl.html
--
[email]francois.piette (AT) overbyte (DOT) be[/email]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.