Forums > MaxMSP

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

April 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


April 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?


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

– Pasted Max Patch, click to expand. –

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

Yiannis


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

p


Viewing 5 posts - 1 through 5 (of 5 total)