How does one insert a line-break/new line in a message dialog?
Professional Software Development Tools
How does one insert a line-break/new line in a message dialog?
\n -- Should do it.
Or
\13\10 -- Would do a Carriage Return (ASCII Char 13), LineFeed (ASCII Char 10)
As a side note, for those that need to have a quotation mark(s) in their string, instead of doing the escape sequence like this:
"\"" .. "Worm" .. "\"" -> "Worm"
You can do this:
"\34Worm\34" -> "Worm"
Total preference here, but I think the second one is easier to read.
Thanks Worm, good stuff!
The best way to break a line is usually "\r\n"
I personally like use the double square brackets [[Text here]]
result = Dialog.Message("Notice", [["Your message
here."]], MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
This will display a dialog like:
"Your message
here"
It formats just like you type.
kpsmith: Way to get intimate with the language.
Worm: You can also include double-quotes in a string by enclosing the string in single-quotes.
Instead of this:
"\"Worm\"" -> "Worm"
You can use this:
'"Worm"'
Yep.. I've been cramming for the scripting test. Printed the scripting guide, highlighted, underlined, made notes and must of read the thing front to back at least 3 times now.
My biggest fear... if I stop I'll forget it all.
Yeah, I need to get a life.
thanks for this thread --- answered the question perfectly...
\r\n worked like a charm.
No no don't stop - I need you to be as knowledgeable as possibleOriginally Posted by kpsmith
![]()
kpsmith,
I did the same. Print it and read it over and over again. Then, I can use it when necesary.
So many programs, so many languages, so many keyboard shorcuts.....
Yossi
I did the same thing and try to remember all that is in the scripting guide. I also read on www.lua-users.org/wiki for lua code. In particular, string functions that are not in AMS.
Tigg
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine