Re: Problem copying MsgBox text in Vista
- From: "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 3 Oct 2007 19:21:12 -0500
Paul Randall wrote:
In WXP your script can create an string of ANSI characters and display it
in a message box. You can manually copy all the characters from the
message box by hitting Ctrl-C while the message box is active, even if the
original string was too large to be displayed in the message box. No
Chr(0) or any character after it is displayed and thus can't be copied,
but all other characters can be displayed and copied. The result can be
pasted into Notepad and when saved to a file, exactly matches the original
string displayed in the message box with a few extra lines for the message
box's title and buttons.
This can be a handy way to collect and use debugging info while
troubleshooting a VBScript as long as what you display does not contain
Chr(0).
In Vista, it works pretty much the same, except when the copied message
box is pasted into Notepad, a carriage return Chr(13) is inserted ahead of
every linefeed Chr(10) character, even if the previous character is a
Chr(13). Single spaced text in the message box becomes doublespaced in
Notepad.
I don't know if Vista handles VBScript's message boxes differently than
WXP or maybe Vista's Notepad works differently than XP's Notepad. Or
maybe Vista's clipboard or its interface works differently.
I'd like suggestions on how to get what I see when I copy message boxes in
Vista. I thought the whole idea of Windows is WYSIWYG.
-Paul Randall
I suspect the copy paste functionality is at fault. I've noticed since I
started using my Vista computer that my posts in the newsgroups often have
many extra blank lines. I believe this is because I often paste code into
the messages, either from text files (using Notepad) or from my web site
(using Windows Explorer). I find it extremely annoying but do not know how
to "fix" it. I also sometimes find my email messages are not WYSIWYG. Vista
has too much intelligence, inserting or removing carriage returns without my
consent. If someone knows how to turn this "intelligence" off I would
greatly appreciate it.
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
.
- References:
- Problem copying MsgBox text in Vista
- From: Paul Randall
- Problem copying MsgBox text in Vista
- Prev by Date: Re: Should be trivial, but isn't.
- Next by Date: Re: Should be trivial, but isn't.
- Previous by thread: Problem copying MsgBox text in Vista
- Next by thread: connecting to a computer's local printer
- Index(es):