sprintf formatting with quotes

Jun 10, 2013 at 10:17am

sprintf formatting with quotes

I am attempting to create an instance of sprintf that always formats a section of the message with quotations around it

right now I have this as my sprintf object
sprintf script newobject newobj @text β€œ%s” @patching_rect 20. 500. 50. 20. @varname icecreamery222

BUT the problem with this is even though I type in β€œ%s”, after I click outside of the sprintf object it reduces the “%s” to %s, how can I format this/use sprintf in such a way that it will preserve the quotation marks? I can’t use the symout argument as this will put quotations around the entire string when it only need have quotes around a chunk in the middle of the message

#252288
Jun 10, 2013 at 10:34am

a symbol only has the double quotes when there’s a space, so “%s” shouldn’t exists. You can just combines the strings with prepend/append.

<code>

– Pasted Max Patch, click to expand. –

</code>

#252289
Jun 23, 2013 at 11:32pm

hey thanks.. this is exactly what I needed.

#253821
Apr 4, 2014 at 2:52pm

I am trying to send a long list of numbers through OSC and “tosymbol” only accepts 256 chars at the timje. Is there a way to add quotes to large lists?

Thanks

#285709

You must be logged in to reply to this topic.