How to copy message from pop-up window?
Not that I know of, but you can access most text elements from the accessibility API. For example this shows the prompt text in password dialogs:

tell application "System Events" to tell process "SecurityAgent" to value of UI elements of UI elements of window 1