Add elements to message from another message box

ward de jager's icon

In pure data we can construct longer messages with message boxes

Forr example add2 : will add another number without terminating comma

Addcomma : will add a comma etc..

Addsemi : add semicolumn

Adddollar etc...

I know max messages accept prepend and append messages but I can't seem to add commas or semicolumns


Source Audio's icon

In word one can do it even easier...

joke aside, max treats some chars different than the others,

and uses append message to insert items into message

and some other objects.

Have a look in help and reference of message object

adding comma using \, is ok, but adding semicolon into a message will give you

a trouble.

unless you want to use it as sender of messages.

Roman Thilenius's icon

i believe in order to add commas to messageboxes you would know what message you want to add the comma to.

the best way to recreate the pd behaviour to a messagebox is probably to use scripting, and delete/recreate the messagebox in question.

the messagebox itself is never the best solution for that of thing. [coll] works almost ike a messagebox for storing and retreivign data, and you do not have to care about "commas", since they are already contained in it. in addition to append and prepend coll would also offer insert or delete at position and can share its content across the runtime.

Source Audio's icon

coll is not good idea whan one wants to insert commas or semicolons.

They are fixed part of coll syntax.

if you need commas just to iter output, then use iter.

Roman Thilenius's icon

with coll you wont need commas though :)

the "addcomma" message in pd concatenates it with an already stored item.

of course coll and zl.nth have tha disadvantage that you have to take care about lists vs symbols yourself. that´s the only things message it good at, it lets you type what you want.