Re: How to execute commands one by one (General questions)
i did something like this. it will find Token Code: and then i send DTL + /r/n which is LF constant in my case. and check for : but it never find :
screen = telnet1.WaitFor( Press any key to continue , timeout);
telnet1.DataReady = 0;
telnet1.Send(LF);
if (!WhileTokenNotFound( Code: ))
{
telnet1.Send( DTL + LF);
telnet1.DataReady = 0;
screen = string.Empty;
if (!WhileTokenNotFound( : ))
{
telnet1.DataReady = 0;
screen = telnet1.Execute( sys + LF, $ , timeout);
}
}
private bool WhileTokenNotFound(string Token)
{
bool notFound = true;
while (notFound)
{
if (screen.IndexOf(Token) == -1)
{
screen = telnet1.ReceiveLine();
AddToList(screen);
}
else
{
notFound = false;
}
}
return notFound;
}
Complete thread:
- How to execute commands one by one - lax4u, 2007-07-03, 00:31
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 01:38
- Re: How to execute commands one by one - lax4u, 2007-07-03, 06:54
- Re: How to execute commands one by one - woddrazen, 2007-07-03, 08:13
- Re: How to execute commands one by one - lax4u, 2007-07-03, 15:27
- Re: How to execute commands one by one - woddrazen, 2007-07-03, 15:53
- Re: How to execute commands one by one - lax4u, 2007-07-03, 15:59
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 16:03
- Re: How to execute commands one by one - lax4u, 2007-07-03, 16:19
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 16:26
- Re: How to execute commands one by one - lax4u, 2007-07-03, 17:10
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 17:41
- Re: How to execute commands one by one - lax4u, 2007-07-03, 17:41
- Re: How to execute commands one by one - wodDamir, 2007-07-03, 17:57
- Re: How to execute commands one by one - lax4u, 2007-07-03, 18:15
- Re: How to execute commands one by one - wodDamir, 2007-07-03, 18:26
- Re: How to execute commands one by one - lax4u, 2007-07-03, 20:56
- Re: How to execute commands one by one - wodDamir, 2007-07-03, 21:10
- Re: How to execute commands one by one - lax4u, 2007-07-03, 20:56
- Re: How to execute commands one by one - wodDamir, 2007-07-03, 18:26
- Re: How to execute commands one by one - lax4u, 2007-07-03, 18:15
- Re: How to execute commands one by one - wodDamir, 2007-07-03, 17:57
- Re: How to execute commands one by one - lax4u, 2007-07-03, 17:41
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 17:41
- Re: How to execute commands one by one - lax4u, 2007-07-03, 17:10
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 16:26
- Re: How to execute commands one by one - lax4u, 2007-07-03, 16:19
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 16:03
- Re: How to execute commands one by one - lax4u, 2007-07-03, 15:59
- Re: How to execute commands one by one - woddrazen, 2007-07-03, 15:53
- Re: How to execute commands one by one - lax4u, 2007-07-03, 15:27
- Re: How to execute commands one by one - woddrazen, 2007-07-03, 08:13
- Re: How to execute commands one by one - lax4u, 2007-07-03, 06:54
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 01:38