Hello,
Note: Already a very long time I have been wondering why this does not already exist as it is a very
handy thing to have and the demand for it occurs very frequently.
---
1. As far as I know at this moment there does not exist I assume a very much asked for command to (in a simple, short and effortless way):
"copy a string to the TSE clipboard"
2. For the Microsoft Windows clipboard this already exists and you can write and run successfully:
PROC Main()
STRING s[255] = "foobar"
CopyToWinClip( s )
END
3. But there does not exist a TSE equivalent thus as far as I know as it does not exist. E.g. as a proposal
for a name 'CopyToTseClip( STRING s )
E.g.
PROC Main()
STRING s[255] = "foobar"
CopyToTseClip( s )
END
4. So at the moment one has to write a lot of rather superfluous TSE source code to get something equivalent (like I had to do in my recent TSE parser program), something like:
PROC Main()
INTEGER bufferI = 0
//
PushPosition()
bufferI = CreateTempBuffer()
PopPosition()
//
PushBlock()
PushPosition()
//
GotoBufferId( bufferI )
//
// put the string in the buffer and highlight it, then copy it to the TSE clipboard
BegLine() UnMarkBlock() MarkStream() EndLine() Left() MarkStream() Copy()
//
PopBlock()
PopPosition()
//
END
5. One can then to get it back e.g. somewhere else in your TSE program:
a. Use Paste() if using CopyToTseClip() (when it should exist)
b. Use CopyFromWinClip() if using CopyToWinClip()
Thanks
with friendly greetings
Knud van Eeden