manipulating strings

I’d like to build a variable message in javascript for the object line
(like 0, 1000 1000), but I don’t manage to delete the space beetween "0"
and ",".
Is there a function like concat(string1, string2, …) in the Max
environnement.
I try something below but it does work.

> But it still not works for line. It tells : line doesn’t undestand
> the message "0,"
> The curious thing is :
> – if I print the message named it is 0, 2000 2000
> – if I prepend it to a message box it write 0, 2000 2000
> it seems that the message is not a real list of numbers but text.
> Any idea?

Commas are not part of messages (nor strings), they are delimiters
between multiple messages to specify sequence. The way I’d approach
this from JS would not consist of making a string containing a comma,
but rather send a sequence of messages–i.e. for (0, 2000 2000) use
the following:

outlet(0,0);
outlet(0,2000,2000);

I’m not sure that any means of setting a message box text to contain
a comma delimited message sequence from JS is available unless you
use scripting to instantiate the corresponding message box. To my
knowledge, there’s currently no way to set the message *text* which
is parsed into an *atom list* as is what happens when editing the
text buffer of a message box from the UI.

However, there might be some way to accomplish this that I’m
overlooking (fromsymbol or something). Personally, I’ve never had the
need to do this, so someone else might be able to offer additional
insight if they’ve found a way to communicate an "A_COMMA" atom to
the message box’s prepend set message. Traditionally, there has been
no support for sending A_COMMA or A_SEMI atoms through max patch cords.

Quote: jkc wrote on Tue, 11 July 2006 07:58
—————————————————-
> so someone else might be able to offer additional
> insight if they’ve found a way to communicate an "A_COMMA"
> atom to the message box’s prepend set message. Traditionally,
> there has been no support for sending A_COMMA or A_SEMI atoms
> through max patch cords.

So you’re saying a simple backslash (as below) shouldn’t work? I’ve been using it for quite a while now ;-)

Or do you mean there’s no way to send the backslashed comma or backslashed semicolon as part of a message from within a js? I’ve not found a way to do that.