How do I copy the text content of a dialog box on OS X?
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: