Creating new lines with strings

You can use HTML formatting inside a string in URScript, for example if you create a popup using the following command:

popup("<html>Width: 20 inches<br>Height:10 inches<br>Would you like to continue with these settings?</html>")

This will for mat the text as you wish, with the <br> tag indicating a new line. You can also use other html tags to aid formatting too, enabling you to centre text, use bold or italic text etc.

As for a yes/no popup, the only popups available URScript are those shown in the popup() command I used to demonstrate this. You will have to code your own if you want some yes/no functionality

Hope this helps.

EDIT: For anyone wondering this also works in java and thus can be used when configuring JLabels and other swing components for a URCap

5 Likes