Problem: select text from the backlog and copy - WeOnlyDo Discussion board

Problem: select text from the backlog and copy (wodTelnetDLX)

by vbiggar, Tuesday, May 30, 2006, 08:45 (6762 days ago)

I would like to select text from the backlog, not just the text visible on the screen and copy it to a clipboard. I created a buffer file to hold text which can be opened as needed but most users would require that they can copy and paste text from the backlog for ease of use.

Re: Problem: select text from the backlog and copy

by wodDrazen, Tuesday, May 30, 2006, 09:32 (6762 days ago) @ vbiggar

Hi,


Did you try to increase value of BackLog Property.
Default value is 25 and you can change it to some other bigger value.

Here is example:

wodTelnetDLX1.BackLog = 250


More help for BackLog Property you can find here:
http://www.weonlydo.com/TelnetDLX/Help/WODTELNETDLXLIB~wodTelnetDLX~BackLog.html

Hope this helps.


Regards,
Drazen

Re: Problem: select text from the backlog and copy

by vbiggar, Tuesday, May 30, 2006, 09:43 (6762 days ago) @ wodDrazen

I increased the size of the backlog which saves data to the Terminal screen but anything that is not visible can't be selected.

Re: Problem: select text from the backlog and copy

by wodDrazen, Tuesday, May 30, 2006, 10:49 (6762 days ago) @ vbiggar

Hi,


I suggest you look at Text property. It holds raw buffer of current screen, so perhaps that's exactly what you need?

Here is example:

Debug.Print wodTelnetDLX1.Text(-1)

you will get first line from backlog buffer (just above topmost currently visible).


More help for Text Property you can find here:
http://www.weonlydo.com/TelnetDLX/Help/WODTELNETDLXLIB~wodTelnetDLX~Text.html

Hope this helps.


Regards,
Drazen

Re: Problem: select text from the backlog and copy

by vbiggar, Tuesday, May 30, 2006, 12:10 (6762 days ago) @ wodDrazen

Lets say I have a 1000 line back log. I have 50 lines normally visible and I can select a box in the first 50 lines. If I scroll up to lets say -425 and now I guess lines -425 to -375 would be visable.

If I select a box in that range nothing gets selected. Using the Text property would then select a whole line of text when I might want just one word.

Is there any way to determain what text I am actually selecting?

Re: Problem: select text from the backlog and copy

by vbiggar, Tuesday, May 30, 2006, 13:34 (6762 days ago) @ vbiggar

I used the following code:

Private Sub wod1_Click(ByVal Row As Integer, ByVal Column As Integer)
MsgBox Row & & Column
End Sub

I determained that the mouse click is selecting the text and using the -row and the correct column when I scroll to the backlog. I think it would be real simple for you to extend the selection of text beyond the visable window.

I may be able to write something that looks at that looks at the bottom row and top row then gets the lines then trims everything before the start column and after the end column. If you already have something written that does this it would be a big help.


Re: Problem: select text from the backlog and copy

by wodSupport, Tuesday, May 30, 2006, 19:42 (6762 days ago) @ vbiggar

I think I understand. Please download wodTelnetDLX again and try it out, now it will allow you select outside of visible screen - it will auto-scroll the screen.

Hope it helped.
Kreso

Re: Problem: select text from the backlog and copy

by vbiggar, Wednesday, May 31, 2006, 06:08 (6762 days ago) @ wodSupport

2 problems.

1.) The auto scroll is great. However anything selected with a -row will not be copyied with the selected text.

In other words if my selection is (row,column) -20,20 to 40,60 the only text that will appear is 0,20 to 40,60.

2.) If the telnetDLX application was payed for and sent via email how do I get the update via the download. (I will read more in the forums to try to see if this was answered in the past.)

Re: Problem: select text from the backlog and copy

by vbiggar, Wednesday, May 31, 2006, 08:09 (6761 days ago) @ vbiggar

I want to add some thoughts about the text selection problem noted in the above comment. Hopefuly it could help.

First an easy solution would be to have 2 areas defined. The first would be the visible area which could continue to be defined as it is without effecting the operation on the vt100. This area would start at (row, column) 0,0 in the upper left to 25,80 for example in the lower right of the visible screen. This would be a 25x80


Lets say we have 500 lines of backlog:
The second defined area would be independent of the visible area. It start at 0,0 at the top of the backlog to 80,500 at the bottom right of the visible area. This new defined area would only be used by the selected text property or the CLick event to allow the user to select the text anywhere on the object.

Re: Problem: select text from the backlog and copy

by vbiggar, Wednesday, May 31, 2006, 08:16 (6761 days ago) @ vbiggar

I hope this is my final point.

I also noticed with the new scrolling while selecting text, once you leave the visible area you can only drag and scroll up. If you try to stop scrolling up and reverse direction back down you continue to scroll up.

Re: Problem: select text from the backlog and copy

by vbiggar, Monday, June 05, 2006, 12:34 (6756 days ago) @ vbiggar

The text selection scrolling is corrected but there doesn't seem to be any way to select backlog text with the .text(-i) or .selectedtext. This is critical feature.

Re: Problem: select text from the backlog and copy

by wodAlan, Monday, June 05, 2006, 14:30 (6756 days ago) @ vbiggar

Hi Vincent,

I'm not sure that I can duplicate this problem. Can you prepare small sample and explain step by step what I should do ti duplicate this.
You can send it (zipped) to techsupport@weonlydo.com

If I duplicate this I'll contact or main programmer and we will try to resolve it.

Regards,
Alan

Re: Problem: select text from the backlog and copy

by vbiggar, Tuesday, June 06, 2006, 11:45 (6755 days ago) @ wodAlan

My question was answered in a support ticket but I wanted to post this for anyone browsing the forum for info.

********** from tkt ***********

I noticed why you don't see the problem. When I use your menu to copy, paste etc there is no issue with copying outside the visible window.

If I use SelectedText then no text outside the visible window gets copied to the clipboard. If you could make SelectedText work the same as your menu copy. Also select all from the menu should have an option to select all of the text or just the visible window.


I was trying to remove the VBCrLf from the end of the selection that is added. Many times you don't want to paste a CRLF along with your text. Its safer to just hit enter when done pasting.

I did this with the following code added to the right click event


Private Sub wod1_RightClick(ByVal Row As Integer, ByVal Column As Integer, ShowMenu As Boolean)


Dim test As Integer

aa = Clipboard.GetText()
test = InStr(Len(aa) - 2, aa, vbCrLf, vbBinaryCompare)

If test > 1 Then
aa = Mid(aa, 1, Len(aa) - 2)
End If

Clipboard.SetText (aa)
'ShowMenu = False
clipviewer.Visible = True
clipviewer.Text = aa

End Sub

This works pretty good.