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

Apr 28, 2012 at 6:01am

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

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

#63277
Apr 28, 2012 at 12:13pm

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

Do you need them for something special outside of Max?

#228281
Apr 28, 2012 at 12:23pm

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. –
#228282
Apr 28, 2012 at 3:32pm

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

#228283
Apr 28, 2012 at 5:59pm

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

#228284

You must be logged in to reply to this topic.