[twsocket] TnScript: Changes needed to make it work with (rad 2010)

2010-02-01 Thread Wayne Belshaw
Francois,

Thanks very much for your support!

PS: I owe you a picture post-card now that I will start using the modules.

[twsocket] TnScript: Changes needed to make it work with
Francois PIETTE francois.piette at skynet.be
Mon Feb 1 18:24:33 UTC 2010

Previous message: [twsocket] TnScript: Changes needed to make it work with
Next message: [twsocket] Having a problem with Rad Studio 2010.
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]



Hello Wayne,

 I'm including the a very simple demo that I compiled and worked with
 Delphi7. It sees the login, supplies the user, password and ctrl-C to
 needed for our login. I then took the same source and compiled with
 Delphi2010. When I click the Connect button, I see the same login:
 prompt  but it does not seem to get detected in the 2010 version of the
 compilation. There is no error message and login remains idle until I
 manually supply the login credentials which then works fine. I'm willing
 to  debug this but I thought it would be something obvious to users of
 TnScript  module.

Fixed Ansi/Unicode issue in TTnCnx.ProcessInputData.
Please update fro SVN repository (or wait tomorrow for next zip file).

--
francois.piette at overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] EmulVT behavior with many rows dumped into client

2010-02-01 Thread Wayne Belshaw
Hello,

I'm having good initial success with use of the telnet client
facility.  I was hoping for a little explanation about the following
performance issues that I see:

I have logging enabled on a simple telnet session using ICS7 and
Delphi2010 compilation with mostly default settings.
I also have TeraTerm with logging enabled (a common client utility
available on the web).

**  I'm logged into a device under test and I dump a large listing
inside the telnet screen with TeraTerm.  It has several hundred lines
that output in around 2 seconds on a network connection.

**  The same large listing output takes around 15 seconds to complete
with the ICS client.   It also visually blocks what is displayed in
the on-screen session (shows only the command issued) and returns with
the last few (tail) lines of the output on the session screen after 15
seconds.  The logs in both cases are accurate and intact.

Questions (as compared to TeraTerm for the most part):

1) Why the significant difference in apparent performance in the
visual session screen?
2) Why does a large dump to the screen block visual output display?
3) Why do shorter output dumps manage to display without blocking?

If I could understand the reasons for the apparent performance impact
it would help me with my system design.

Thanks for any assistance.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TnEmulVT: How to assign the FLogFileName dynamically

2010-01-31 Thread wayne . belshaw
I solved this problem. If the property for the EmulVT Log is set to true,  
then EMULVT.LOG is used for logging. I set the property to FALSE and then  
programmatically set my LogFileName followed by setting TnEMulVT.Log to  
TRUE inside the code. The key was disabling the property at design time so  
it could be activated at run time.


Thanks.


List: twsocket
Subject: Re: [twsocket] TnEmulVT: How to assign the FLogFileName dynamically
From: Angus Robertson - Magenta Systems Ltd angus () magsys ! co ! uk
Date: 2010-01-30 9:02:00
Message-ID: memo.20100130090230.4024B () local ! magsys ! co ! uk
[Download message RAW]


How do I accomplish this? The line below appears to override
attempts to set the property at run time.



FLogFileName := 'EMULVT.LOG'; // angus V6.01


That line simple sets the default file name, which can then be changed by
the LogFileName property, before calling the Log property to start
logging.

What is your actual problem?

Angus

--
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TnScript: Changes needed to make it work with

2010-01-31 Thread wayne . belshaw
I'm including the a very simple demo that I compiled and worked with  
Delphi7. It sees the login, supplies the user, password and ctrl-C to  
needed for our login. I then took the same source and compiled with  
Delphi2010. When I click the Connect button, I see the same login: prompt  
but it does not seem to get detected in the 2010 version of the  
compilation. There is no error message and login remains idle until I  
manually supply the login credentials which then works fine. I'm willing to  
debug this but I thought it would be something obvious to users of TnScript  
module.


unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OverbyteIcsEmulVT, OverbyteIcsTnEmulVT,  
OverbyteIcsTnScript;


type
TForm1 = class(TForm)
ConnectButton: TButton;
DisconnectButton: TButton;
TnScript2: TTnScript;
ExitButton: TButton;
procedure ConnectButtonClick(Sender: TObject);
procedure DisconnectButtonClick(Sender: TObject);
procedure ExitButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.ConnectButtonClick(Sender: TObject);
begin
TnScript2.HostName := '10.32.220.5';
TnScript2.AddEvent(1, 'login', 'admin' + #13#10, [efIgnoreCase], nil);
TnScript2.AddEvent(2, 'password', 'password' + #13#10, [efIgnoreCase], nil);
TnScript2.AddEvent(3, 'Control-C', #13#3, [efIgnoreCase], nil);
TnScript2.Connect;
end;

procedure TForm1.DisconnectButtonClick(Sender: TObject);
begin
TnScript2.Disconnect;
end;

procedure TForm1.ExitButtonClick(Sender: TObject);
begin
close;
end;

end.


List: twsocket
Subject: Re: [twsocket] TnScript: Changes needed to make it work with
From: Francois PIETTE francois.piette () skynet ! be
Date: 2010-01-30 8:59:02
Message-ID: 07FA131664A64DA09C3C75FCDFF65A22 () ovb ! local
[Download message RAW]


I have some utilities based on TnScript that work fine with Delphi-7
and the latest ICS. The same program when compiled with Delphi2010
does not recognize the add event strings in the telnet session.



I'm assuming this is another case where judicious application of
ansiString is needed to accommodate the unicode changes in Delphi2010?


Please be more specific in describong: does not recognize the add event
strings in the telnet session. Which error, which source code ?

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TnEmulVT: How to assign the FLogFileName dynamically or from object property

2010-01-29 Thread wayne . belshaw

Hello,

This is probably a question for Angus?... 8:)

I see that in ICS (v7), I'm able to successfully log telnet sessions within  
the TnEmulVT module if I enable the Log property on the object. I would  
like to be able to also use the LogFileName property in the EmulVT object  
to uniquely assign FLogFileName instead of the hard-coded EMULVT.LOG (see  
below).


How do I accomplish this? The line below appears to override attempts to  
set the property at run time.


FLogFileName := 'EMULVT.LOG'; // angus V6.01

Thank you.
Wayne Belshaw
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TnScript: Changes needed to make it work with Delphi2010?

2010-01-29 Thread Wayne Belshaw
Hello,

I have some utilities based on TnScript that work fine with Delphi-7
and the latest ICS.   The same program when compiled with Delphi2010
does not recognize the add event strings in the telnet session.

I'm assuming this is another case where judicious application of
ansiString is needed to accommodate the unicode changes in Delphi2010?

Can someone point me to the key modules and variables that should be
updated, assuming this is the problem?

Thanks very much!
Wayne Belshaw
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TnEmulVT Data Available Routine in Delphi 2010

2010-01-25 Thread Wayne Belshaw
Thanks Francois!

I changed the code to the following and it worked fine:

 var
Start, Stop : Integer;
Buffer : AnsiString; ==
 begin
  Buffer := PAnsiChar(Buf);  ==

Message: 2
Date: Sun, 24 Jan 2010 20:36:42 +0100
From: Francois PIETTE francois.pie...@skynet.be
Subject: Re: [twsocket] TnEmulVT Data Available Routine in Delphi 2010
   problems
To: ICS support mailing twsocket@elists.org
Message-ID: 92c28c09bc0a4bcc88a277f080d12...@ovb.local
Content-Type: text/plain; format=flowed; charset=iso-8859-1;
   reply-type=original

Hi !

Altough I haven't looked in details at your code, at first glance you are
using String and Char instead of AnsiString and AnsiChar.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


- Original Message -
From: Wayne Belshaw wayne.bels...@gmail.com
To: twsocket@elists.org
Sent: Sunday, January 24, 2010 7:43 PM
Subject: [twsocket] TnEmulVT Data Available Routine in Delphi 2010 problems


 Hello,

 I had a working TnEmulVT/TNScript code module in Delphi 7 using the
 recommended data available event capture routine.  In then upgraded to
 Delphi 2010 including the latest ICS package.

 In the Delphi 2010 version of the build, I see garbage mixed in with my
 TMemo screen which at first glance appears to be some type of issue with
 UniCode conversion.   I'm at a bit of a loss as to the conversion function
 to be used in order to recover my data as I can do successfully with
 Delphi
 7.

 Can anyone assist?   Here is the Data Available event handler that I'm
 using that has been previously posted:

 procedure TForm1.TnScript1DataAvailable(Sender: TObject; Buf: Pointer;
  var Len: Integer);
 const
CR = #13;
LF = #10;
 var
Start, Stop : Integer;
Buffer : String;
 begin
  Buffer := PChar(Buf);
 begin
  if Memo1.Lines.Count = 0 then
  Memo1.Lines.Add('');
  Start := 1;
  Stop  := Pos(CR, Buffer);
  if Stop = 0 then
  Stop := Length(Buffer) + 1;
  while Start = Length(Buffer) do begin
  Memo1.Lines.Strings[Memo1.Lines.Count - 1] :=
  Memo1.Lines.Strings[Memo1.Lines.Count - 1] +
  Copy (Buffer, Start, Stop - Start);
  if Buffer[Stop] = CR then begin
  Memo1.Lines.Add('');
  end;
  Start := Stop + 1;
  if Start  Length(Buffer) then
  Break;
  if Buffer[Start] = LF then
 Start := Start + 1;
  Stop := Start;
  while (Buffer[Stop]  CR) and (Stop = Length(Buffer)) do
  Stop := Stop + 1;
  end;
 end;
 --
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TnEmulVT: Help with how to change cursor type and foreground color?

2010-01-25 Thread Wayne Belshaw
I'm a happy user of the TnEmulVT modules that provide emulated telnet
displays.

I would like to enhance the visible terminal display with a modified cursor
type and also foreground color.

I tried experimenting with a few things but was not successful in changing
them.  My apologies if this issue has come up before.  I did not see
anything obvious in the archives.

Thanks!
Wayne Belshaw
Brocade Communications
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TnEmulVT: Help with how to change cursor type and

2010-01-25 Thread Wayne Belshaw
Just to clarify further, I was able to change the foreground color
using the ANSI standard escape sequences.

I had hoped to try and change the type of cursor that is displayed but
it seemed to always display a flashing vertical bar.

If someone has some escape sequences that will change the cursor to
say a non-blinking underline, that would be helpful.

Thanks.



Subject:[twsocket] TnEmulVT: Help with how to change cursor type and
From:   Wayne Belshaw wayne.belshaw () gmail ! com
Date:   2010-01-25 22:58:27
Message-ID: 65d54b3d1001251458n52080dcfqc66ba44cb04d5858 () mail ! gmail ! com
[Download message RAW]

I'm a happy user of the TnEmulVT modules that provide emulated telnet
displays.

I would like to enhance the visible terminal display with a modified cursor
type and also foreground color.

I tried experimenting with a few things but was not successful in changing
them.  My apologies if this issue has come up before.  I did not see
anything obvious in the archives.

Thanks!
Wayne Belshaw
Brocade Communications
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TnEmulVT Data Available Routine in Delphi 2010 problems

2010-01-24 Thread Wayne Belshaw
Hello,

I had a working TnEmulVT/TNScript code module in Delphi 7 using the
recommended data available event capture routine.  In then upgraded to
Delphi 2010 including the latest ICS package.

In the Delphi 2010 version of the build, I see garbage mixed in with my
TMemo screen which at first glance appears to be some type of issue with
UniCode conversion.   I'm at a bit of a loss as to the conversion function
to be used in order to recover my data as I can do successfully with Delphi
7.

Can anyone assist?   Here is the Data Available event handler that I'm
using that has been previously posted:

procedure TForm1.TnScript1DataAvailable(Sender: TObject; Buf: Pointer;
  var Len: Integer);
 const
CR = #13;
LF = #10;
var
Start, Stop : Integer;
Buffer : String;
begin
  Buffer := PChar(Buf);
begin
  if Memo1.Lines.Count = 0 then
  Memo1.Lines.Add('');
  Start := 1;
  Stop  := Pos(CR, Buffer);
  if Stop = 0 then
  Stop := Length(Buffer) + 1;
  while Start = Length(Buffer) do begin
  Memo1.Lines.Strings[Memo1.Lines.Count - 1] :=
  Memo1.Lines.Strings[Memo1.Lines.Count - 1] +
  Copy (Buffer, Start, Stop - Start);
  if Buffer[Stop] = CR then begin
  Memo1.Lines.Add('');
  end;
  Start := Stop + 1;
  if Start  Length(Buffer) then
  Break;
  if Buffer[Start] = LF then
 Start := Start + 1;
  Stop := Start;
  while (Buffer[Stop]  CR) and (Stop = Length(Buffer)) do
  Stop := Stop + 1;
  end;
end;
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Location of TTrafficLight component and example source code

2009-09-16 Thread Wayne Belshaw
Hello,

I'm trying to locate the source code and TTrafficLight component referenced
in an article written by Francois Piette and found originally in the
following inactive linkage: http://edn.embarcadero.com/print/20465.  It was
titled Writing Client/Server applications in ICS It would be of excellent
educational value. It also does not appear to be in the ICS suite according
to the listing.  Thanks in advance.

Wayne Belshaw
Brocade Communications
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TnScript: Session Capture

2008-04-19 Thread Wayne Belshaw
Caution: I am a Delphi 7 Newbie... 8:)  Apologies in advance for my
elementary questions.

I have been successfully experimenting with the TnScript component in
multiple telnet instantiations along with the event capture feature.  Very
nice indeed.

I wish to modify the parent component TnEmulVT in a manner that Francois
indicates below in order to create a permanent record for each session.

(1) In the interest of simplicity, is it best to simply modify the original
source within the ICS distribution, recompile and then re-install to
Delphi?  Once I have made the modifications, I would always want to use the
session logging capability in all subsequent TnScript applications...being a
novice I'm not certain what is best and I did run into some issues while
experimenting with this.

(2) Assuming I will have several telnet sessions created normally (I'm using
Frames), where is the best location in the project for creating the
TFileStreams to be associated with each of the TnScriptx modules?  A unique
FileStream need to be associated with each copy of TnEmulVT that gets
created.

Thank you.  Feel free to address me directly at [EMAIL PROTECTED] if
the response to my questions is outside of the scope of this mailing list.

From Francois Piette:
procedure TTelnetForm.TnEmulVT1DataAvailable(Sender: TObject;
Buffer: Pointer; var Len: Integer);
begin
if Len  0 then
LogStream.Write(PChar(Buffer)^, Len);
end;

This code assume that your log file has been opened as a TFileStream.
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be