Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 12 of 12
  1. #1
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695

    Quick one..line break

    How does one insert a line-break/new line in a message dialog?

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    \n -- Should do it.

    Or

    \13\10 -- Would do a Carriage Return (ASCII Char 13), LineFeed (ASCII Char 10)

  3. #3
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    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.

  4. #4
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    Thanks Worm, good stuff!

  5. #5
    Join Date
    Jan 2000
    Posts
    2,002
    The best way to break a line is usually "\r\n"

  6. #6
    Join Date
    Jul 2000
    Location
    NY
    Posts
    332
    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.

  7. #7
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728
    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"'

  8. #8
    Join Date
    Jul 2000
    Location
    NY
    Posts
    332
    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.

  9. #9
    Join Date
    Sep 2003
    Posts
    22
    thanks for this thread --- answered the question perfectly...

    \r\n worked like a charm.

  10. #10
    Join Date
    Aug 2003
    Posts
    2,427
    Quote Originally Posted by kpsmith
    if I stop I'll forget it all
    No no don't stop - I need you to be as knowledgeable as possible

  11. #11
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    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

  12. #12
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts