Copy Text From Error Message Dialog Box

January 17th, 2009

As the Windows Guru, I spend a lot of time in forums answering Windows and Windows Scripting related questions. Quite frequently I respond to users who are receiving some form of an error message–and in almost every case, the error message is incomplete or incorrectly worded. For obvious reasons this makes diagnosis difficult, but it’s also completely avoidable. Today I’m going to show you two quick tips for little known Windows keyboard shortcuts that will ensure that you never have to retype the contents of an error message again!

Copy the text from a message box:

Let’s get quick and dirty. When posting a question in a forum or email, all you are really concerned with is the text contents of a message box. This can easily be retrieved in most cases by using the Windows clipboard.

Copy the text from a Windows Error Message Dialog Box

Most system error messages (and many programs) are displayed using the message box function provided by the Windows API. This is even true of the Windows Script Host. With the release of Windows XP, Microsoft added a few enhancements with support in mind. One of which is the ability to copy the text from a message box into the Windows clipboard using the standard Ctrl + C hotkey combination.

While the message box is in focus, press the Ctrl + C hotkey combination to copy the message box text to the clipboard. Then use the Ctrl + V hotkey combination to paste the contents into Notepad, a text area on a web page, or into any other text. The result will include the message box title, contents, and buttons as you see below.

---------------------------
Windows Script Host
---------------------------
Script:	C:\Documents and Settings\Nilpo\Desktop\test.vbs
Line:	1
Char:	26
Error:	Unterminated string constant
Code:	800A0409
Source: 	Microsoft VBScript compilation error
 
---------------------------
OK   
---------------------------

Copy the message box as a screenshot:

In one of the rare events that you run into an error dialog that doesn’t use the message box function, you’ll need another method of copying its contents. Since most forums allow image posting, a screen shot becomes the next best option.

With Windows XP, Microsoft again gave us a quick method of capturing screen shots to the Windows clipboard. With any window in focus, simply press the Alt + Print Screen hotkey combination to capture a shot of the active window to the clipboard. Now enter mspaint in the Run… dialog box to open MS Paint and press Ctrl + V to paste the contents from the clipboard. Save the image as a .jpg and you’re all set.

You can see the result of this procedure in the sample image I posted above.

So there you have it. Two quick, easy ways to copy or capture the text of a Windows Error Message box without having to retype anything.

Please use the trackback link when linking to this post.

Related Posts:

Add to Technorati Favorites

One Response to “Copy Text From Error Message Dialog Box”

  1. Andy Says:

    Hi Everyone,

    I’m becoming crazy, server return this error:

    Microsoft VBScript compilation error ‘800a0409′

    Unterminated string constant

    Response.Write(Server.MapPath(”gallery_link/<%=(rsAds.Fields.Item(”"ImageName”").Value)
    —————————-^

    original code:

    <img src=”/bin/Imager.dll?Image=<%=Server.MapPath(”gallery_link/)”)%>&Width=100&Height=80&Compression=80″>

Leave a Reply

.htaccess Apache article articles by Nilpo ASP ASP Free automation clipboard desktop Dev Shed docx drive Internet Explorer Microsoft PHP registry remove script scripting text tutorial tweak tweets Twitter UAC updates User Account Control VBS VBScript vista volume Windows Windows 7 Windows 2000 Windows Guru Windows Script Windows Script Host Windows Scripting Windows Vista Windows XP Word WScript wscript.exe WSH XP