Custom popup text structure (newline, center, break, underline etc.)

You can use HTML to format a string in URScript, please see this post. Newline, underline, and line breaks are easy to implement. To centre text, you will need to use a div inside the html, for more information on this, see: this post on Stack Overflow. The answer is for formatting text in java, but the principle works just the same in URScript