How to copy message from pop-up window? Is there a way to copy text message in a pop-up window like this is possible on Windows machine by making pop-up window active and then pressing CTRL+C?
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