Skip to content
⌘ NSIS Forum Archive

Line breaks in message boxes

7 posts

Guest#

Line breaks in message boxes

Hi everybody. I got a rather easy question for y'all... is it possible to add a line break within the text of a message box? How can I do it? I tried like it's done in C++:

MessageBox MB_ICONINFORMATION|MB_OK "Line 1\r\nLine 2".

But of course it doesn't work : |.
Afrow UK#
Apparently you should use $\r$\n in Windows but $\n seems to work just fine as well.

-Stu
Joost Verburg#
In C, \n is automatically converted to the system line break (carriage return + line break). In NSIS scripts, $\r and $\n represent carriable return and line break.
Deko Servidoni#
-> $\r$\n
-> MessageBox MB_ICONINFORMATION|MB_OK "Line 1$\nLine 2".

This two way works =]
thx for the help guys