Single-message string won't take quotes in message box!

    Apr 28 2012 | 6:01 am
    Hi everyone,
    I am really frustated here. I am trying to have a single-message string, let's say "hello" and I am trying the backslash trick like so: "hello" and it comes out as " hello" (with a space.)
    I tried many different combinations, but nothing works.
    I even tried [tosymbol] but it returns everything with quotes BUT a single-message quote.
    Any insight on the matter?
    Thanks, Yiannis

    • Apr 28 2012 | 12:13 pm
      I think the quotes of "hello" are redundant within Max and thus ignored/removed.
      Do you need them for something special outside of Max?
    • Apr 28 2012 | 12:23 pm
      I am not able to produce "hello" in a message box, this may depend on the behavior of the box itself. Maybe it is possible with [sprintf ...]
      But if you [print] "hello" to the Max window, it shows up as "hello", so probably it works for you anyway?
      If you need it for display purposes only, you could send set "hello" to a comment object.
    • Apr 28 2012 | 3:32 pm
      Thanks for your responses folks, turns out I didn't need the quotes after all! I just wanted to use [absolutepath] and I wasn't sure whether I needed quotes in the messages or not, but turns out you need quotes for a larger message string.
    • Apr 28 2012 | 5:59 pm
      Quotes are necessary to deal with spaces in messages, and especially with filepathes. You should use tosymbol to automatically add quotes if necessary (i.e. if there are spaces in the path).
    • Jan 31 2018 | 4:17 pm
      I'm using incredibly long strings of text (I know max is not exactly designed for that) and I have to use quotation marks in order to push the text into a message box so that it includes the whole message. Is there a way around this, or is it completely necessary to have these strings of text?