How do I copy the text content of a dialog box on OS X? Many people are not aware that on Windows you can copy the whole text content of a MessageBox by pressing Ctrl ⌃ + C when the dialog is focused.

This is an essential feature for reporting error messages, and in some cases these could be huge.

Still, it seems that on OS X, that Command ⌘ + C does not work and I'm wondering if there is another method for doing this. 

Doing screenshots is not so convenient, especially that they are not searchable :p

I am looking for a generic solution, if it exists. Here is an example:
The most generic way may be to use the Accessibility Inspector and copy the text form its window.


  In Mac OS X v10.4 and later, Apple provides the Accessibility Inspector testing tool...
  
  Accessibility Inspector presents a utility window that displays the attributes (and values), actions, and position in the accessibility hierarchy of the object currently under the mouse pointer. To use Accessibility Inspector, be sure to enable assistive applications in the Universal Access Preferences.




Here is an example for Trim Enabler, where you can't select and copy the text of the "About" tab:



And the window displayed by Accessibility Inspector:



This is with the mouse pointer hovering over the long text, which can then be found in AXValue.

Edit 2014-10-18:

The next example shows step-by-step how to copy text that is not selectable using Accessibility Inspector 4.0:

Open the window from where the information shall be extracted and open Accessibility Inspector, then hover the mouse pointer over the element of interest:



Press Command ⌘ + 7 to lock Accessibility Inspector, then click on the line you want to copy (e.g. AXValue) and press Command ⌘ + C to copy it to the clipboard:



Paste the copied text where needed: