View Full Version : RichText.GetSelectedText
yosik
01-30-2008, 10:12 AM
It would be very helpfull to be able to highlight a peice of text in a RichText object and set it as a string value for a variable. The way it stands now, you can only get the index values of the start and end of a selection.
Furthermore, it would also be interesting to be able to get that selection as elements of a table, one per line, similar to TextFile.ReadToTable.
Yossi
Darryl
01-30-2008, 11:22 AM
Thanks for the suggestion Yossi.
REF: 17187
Unless you're saying you want a built in function, you can use String.Mid with the Selection's Start and (End - Start) to grab what you have selected.
yosik
01-30-2008, 04:19 PM
Yes you can, Worm (and thanks for helping in this), but I think that there should be a built-in action.
Even if you could use the Clipboard action and copy the selected text into it, you can only paste it. You cannot put the clipboard content into a variable (and actually, you cannot do the opposite: read a variable value into the clipboard).
Yossi
SonG0han
01-30-2008, 04:26 PM
But you can. :)
Try this: Click on Project > Plugins... in the filemenu and enable the Clipboard Plugin.
This enables new actions like:
result = Clipboard.GetText(); -- put text from clipboard in a var
Clipboard.CopyText("My Text"); -- copy text into clipboard (can be a var)
yosik
01-30-2008, 04:42 PM
I stand corrected.
You are 100% right.
Thanks for pointing that out.
Yossi
You were scaring me a little there Yos. I thought my memory was going. Maybe I need to paste a little more to my own clipboard :)
yosik
01-31-2008, 12:10 AM
:)
I am looking for a memory compressing package. I could use additional space in my brain.....
Overload...Overwork...Over...everything... This is the result...
:)
Yossi
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.