Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Get CLIP: into a MSGBOX?

May
12,845
164
MSGBOX handles multiline messages. How can I get the contents of the clipboard into a MSGBOX.

For my immediate purpose, a file would do as well as the clipboard. Perhaps a future version will support "MSGBOX ... @file" (maybe including @CLIP:).
 
MSGBOX handles multiline messages. How can I get the contents of the clipboard into a MSGBOX.

For my immediate purpose, a file would do as well as the clipboard. Perhaps a future version will support "MSGBOX ... @file" (maybe including @CLIP:).

If I do the following;

Code:
set jlc=Line 1^r^nLine 2^r^nLine 3^r^n
then

Code:
msgbox ok "Test" %jlc
I get three lines of text in the msgbox.

If you process the clipboard, adding ^r^n to the end of each line, directing the result to an environment variable, this might do what you want.

Reference: http://www.jpsoft.com/forums/showthread.php?t=1553

Joe
 
On Sat, 31 Jul 2010 15:50:52 -0400, Joe Caverly
<> wrote:

|If you process the clipboard, adding ^r^n to the end of each line, directing the result to an environment variable, this might do what you want.

I was aware of that brute-force method.

And I think SET would gobble up those escape sequences.

I wrote a little plugin:

Code:
v:\> escape /?
In a pipe only - CRLF to ^r^n; escape & | > < and %

v:\> echo Line 1^r^nLine 2 | escape > clip:

v:\> echo %@clip[0]
Line 1
Line 2

It works with MSGBOX, too, as I originally wanted.

Is it of any general value?
 

Similar threads

Replies
4
Views
850
Back
Top