Copy problem in VT100 - WeOnlyDo Discussion board

Copy problem in VT100 (wodSSH / wodSSH.NET)

by vbiggar, Thursday, June 08, 2006, 11:18 (6743 days ago)

When I copy from the OCX VT100 using the menu I get:


Missing Cards: 1LMASM

FrontCardBackCard FrontCardBackCard
TypeRevTypeRevStatus TypeRevTypeRevStatus
1BXM-155ENESM-4BBFailed 9BXM-T3EMETE3-12BAActive
2Empty 10BXM-T3EKETE3-12BAActive
3Empty 11BXM-T3EMETE3-12BAStandby
4BXM-T3EMETE3-12BAStandby 12BXM-622EMESM-1BDActive
5BXM-155EJESM-4BBStandby 13Empty
6BXM-T3EDETE3-12BAStandby 14BXM-T3EJETE3-12BAStandby
7BCC-4HHMLM-2ADActive 15ASMAAAEmptyActive
8BCC-4HCMLM-2ADStandby

It should look like this:

Missing Cards: 1 LMASM

FrontCard BackCard FrontCard BackCard
Type Rev Type Rev Status Type Rev Type Rev Status
1 BXM-155 ENE SM-4 BB Failed 9 BXM-T3 EME TE3-12BA Active
2 Empty 10 BXM-T3 EKE TE3-12BA Active
3 Empty 11 BXM-T3 EME TE3-12BA Standby
4 BXM-T3 EME TE3-12BA Standby 12 BXM-622 EME SM-1 BD Active
5 BXM-155 EJE SM-4 BB Standby 13 Empty
6 BXM-T3 EDE TE3-12BA Standby 14 BXM-T3 EJE TE3-12BA Standby
7 BCC-4 HHM LM-2 AD Active 15 ASM AAA Empty Active
8 BCC-4 HCM LM-2 AD Standby

I don't think this was a problem when I was using the selectedtext property. I can't use selected text as you know because the text that is in the buffer won't copy. Can someone look into this and see if anything can be done?

Re: Copy problem in VT100

by vbiggar, Thursday, June 08, 2006, 11:20 (6743 days ago) @ vbiggar

Odly enough I lost my formatting when I posted this the same way it is lost when using the copy option from the menu.

Anyways this output had multiple columns aligned. Now the data is bunched together.

Re: Copy problem in VT100

by wodAlan, Thursday, June 08, 2006, 11:57 (6743 days ago) @ vbiggar

Hi Vincent,

We talking about last version, which fixed, right?
How can I duplicate this? I tried this but alignment works fine.
Can you prepare some small sample which can duplicate that and send it to techsupport@weonlydo.com

Maybe you can try to connect to our server and check this?
I'm asking this because this can be problem form servers side, which I cannot duplicate. I mean, maybe I cannot duplicate this because we have different server then yours.

Regards,
Alan

Re: Copy problem in VT100

by vbiggar, Thursday, June 08, 2006, 13:37 (6743 days ago) @ wodAlan

Ok I wrote the following using the selected text:

Private Sub mnutermCopySub()

Dim aa As String

On Error Resume Next

aa = Mid(wod1.SelectedText, 1, Len(wod1.SelectedText) - 2)
'MsgBox aa

' Copy selected text to Clipboard.
Clipboard.Clear
Clipboard.SetText aa

clipviewer.Text = Clipboard.GetText()

End Sub

This copies the text in the proper format.

I'm posting this from the SelectedText capture. I'm not sure if it will format right when I post it or not.

FrontCard BackCard FrontCard BackCard
Type Rev Type Rev Status Type Rev Type Rev Status
1 BXM-622 EHE SM-1 BD Active 9 BXM-155 ELE SM-4 BB Active
2 BXM-622 EHE SM-1 BD Active 10 BXM-155 EHE SM-4 BB Active
3 BXM-622 EHE SM-1 BD Active 11 BXM-T3 EJE TE3-12BA Active
4 BXM-622 EPE SM-1 BE Active 12 BXM-622 ESE SM-1 BD Active
5 BXM-T3 EKE TE3-12BA Active 13 Empty
6 BXM-155 EEE SM-4 BB Active 14 BXM-T3 EHE TE3-12BA Standby
7 BCC-4 HCM LM-2 AC Standby 15 ASM ACC LMASM AC Active
8 BCC-4 HCM LM-2 AC Active


This is a raw capture from the terminal:
[0mdspcds[?25l[?25h[19;21H[?25l[19;1HThis[?25h[19;21H[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[19;1HLast[?25h[19;21H[23;1H[22;1H[0KNext Command: [?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25h[?25l[?25hbye[?25l[?25h[19;21H[?25l[19;1HThis[19;15Hbye[0K[?25h[?25l[?25h

[?25h[0m[2J[1;1H[?25l[0;2;7mscrmbp1[?25h[1;1H[1;38HBPX 8620[1;22H[0mNo User [1;48H9.2.33[?25l[1;58H[0;2;7mJune 8 2006 11:31 GMT [?25h[1;54H[18;1H[0;4m [19;1H[?25l[0mLast[19;6HCommand:[19;15Hdspcds[?25h[24;1H [24;20H [24;23H [24;70H[0;5;7mMAJOR ALARM[24;1H[1;16H[0;2;7mTN [0m [?25l[?25h[?25l[?25h[19;21H[?25l[19;15H[0K[?25h[1;22HNo User [20;1H[19;1H[0K[?25l[?25h[21;1H

Re: Copy problem in VT100

by vbiggar, Thursday, June 08, 2006, 13:41 (6743 days ago) @ vbiggar

TRK Type Current Line Alarm Status Other End
1.1 OC12 Clear - OK riltbp1/1.1
2.1 OC12 Clear - OK snf3bp2/2.1
3.1 OC12 Clear - OK mpl1bp1/2.1
4.1 OC12 Clear - OK scrmbp2/4.1
5.4 T3 Clear - OK soulbp1/3.2
6.1 OC3 Clear - OK scrmax1(AXIS)
6.2 OC3 Clear - OK tkyobp1/2.1
6.3 OC3 Clear - OK scrmbp2/11.2
6.4 OC3 Clear - OK sin2bp1/4.2

Re: Copy problem in VT100

by vbiggar, Thursday, June 08, 2006, 13:42 (6743 days ago) @ vbiggar

Looks like the spaces are being removed when I post a message to the forum.

Re: Copy problem in VT100

by wodDamir, Thursday, June 08, 2006, 14:05 (6743 days ago) @ vbiggar

Hi Vincent,

You should try inserting code like this before Connect Method:

------------------------
telnet1.StripANSI = True
------------------------

If the problem persists, contact us.

Regards,
Damir

Re: Copy problem in VT100

by vbiggar, Friday, June 09, 2006, 05:33 (6743 days ago) @ wodDamir

The stripansi = true makes a real mess of things on VT 100 but it is an interesting option and may be useful in the future.

I think this is what your copy option is doing where the selected text option is not. The whole purpose of using VT100 is to have the formatting and to allow for the screen refesh of data.

When I do a copy I want the ansi data and the column formatting. Anyone using VT100 would want it also. I will find a VT100 terminal on the web that you can connect to test against.

I will use the selectedtext until you we resolve this. I will try to get another menu option appended to your menu.

Re: Copy problem in VT100

by wodDrazen, Friday, June 09, 2006, 09:05 (6742 days ago) @ vbiggar

Hi Vincent,


It would be best if you can provide us access to some server where we can test your problem.
Please send private information to techsupport@weonlydo.com.

Hope I helped.


Regards,
Drazen

Re: Copy problem in VT100

by vbiggar, Monday, June 12, 2006, 07:00 (6740 days ago) @ wodDrazen

Hi Vincent,


It would be best if you can provide us access to some server where we can test your problem.
Please send private information to techsupport@weonlydo.com.

Hope I helped.


Regards,
Drazen

I don't have a server you can have access to. I tried to find a vt100 test server but I was unable to find anything. I will try to find a Unix/Linux command that sets up the VT100 formatting. There are some VT100 test environments that can be installed to a Linux server.

This much I can tell you: The copy works fine with the SelectedText property but doesn't when you use the built in COPY option from the OCX menu. What I do to work around this problem is I set up a seperate menu option for VT100 that uses the SelectedText.

Here is the code:


'############# popup menu items ############

Dim hMenu As Long, hSubMenu As Long

Private Declare Function AppendMenu Lib User32 Alias AppendMenuA (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As String) As Long

'#############################################

Private Sub Form_Load()

hMenu = wod1.ContextMenu
AppendMenu hMenu, 0, 32770, VT100 Copy
AppendMenu hMenu, 0, 32768, Commands

End Sub

'##################################################

Private Sub wod1_MenuClick(ByVal ID As Long)

Dim aa As String

Dim frmComm As frmcommander

On Error Resume Next

'This code removes the extra VBCRLF and copies the selected text to the clipboard
'without loosing the VT100 formatting

If ID = 32770 Then
aa = Mid(wod1.SelectedText, 1, Len(wod1.SelectedText) - 2)

' Copy selected text to Clipboard.
Clipboard.Clear
Clipboard.SetText aa

End If


'This is another menu option I added which opens a form

If ID = 32768 Then

stringdata = Clipboard.GetText()

Set frmComm = New frmcommander
frmComm.Show

End If
End Sub

Re: Copy problem in VT100

by wodDamir, Monday, June 12, 2006, 10:10 (6739 days ago) @ vbiggar

Hi Vincent,

I can't seem to get this duplicated. I get the same output wether if i do Copy & Paste or use SelectedText Property.

Can you send us screenshot so we can see exactly what your output looks like?

Regards,
Damir

Re: Copy problem in VT100

by vbiggar, Monday, June 12, 2006, 11:16 (6739 days ago) @ wodDamir

I sent an example of both in a email to techsupport@weonlydo.com

Re: Copy problem in VT100

by wodSupport, Monday, June 12, 2006, 11:44 (6739 days ago) @ vbiggar

Vincent,

we got the picture - i see the problem now.

But.. I don't see how it can happen with wodTelnetDLX - we never remove spaces, especially between text itself.

Your picture looks to me like it was shown in IE's browser, which would remove spaces. Possible?

Can I get your application (I don't thikn I need source) so I can run with wodTelnetDLX in debug mode to duplicate your problems?

Kreso

Re: Copy problem in VT100

by vbiggar, Monday, June 12, 2006, 13:20 (6739 days ago) @ wodSupport

I couldn't send you the program I'm running because you wouldn't have the directory structure needed. So I modified the sample code and made a screen capture with an exaple pasted into note pad.

The executable is in the zip folder as well. I think its called Project1.exe.