vefatica May 13,264 183 2010-07-31 #1 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:).
Joe Caverly Aug 2,073 84 2010-07-31 #2 vefatica said: 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:). Click to expand... 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
vefatica said: 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:). Click to expand... 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
vefatica May 13,264 183 2010-07-31 #3 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?
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?