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

Yiannis Ioannides's icon

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

broc's icon

I think the quotes of "hello" are redundant within Max and thus ignored/removed.

Do you need them for something special outside of Max?

Peter Ostry's icon

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?

Max Patch
Copy patch and select New From Clipboard in Max.

If you need it for display
purposes only, you could send
set "hello"
to a comment object.

Yiannis Ioannides's icon

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.

Yiannis

pdelges's icon

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).

p

SpaceSpud96's icon

@pdelges

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?