construct message with comma's, without whitespace and backslash
Hello all,
I need to construct a message of 3 floats, divided by comma's. If I use sprintf and regexp, the output always adds backslashes before the comma. The ouput looks like 0.1,0.2,0.3 or 0.1, 0.2, 0.3 while I need 0.1,0.2,0.3. So, i don't want any whitespace nor backslashes in the output
How should this be done?
I added an example patch:
sprintf works just fine !
If I did understand correctly:
Am I wrong ?
Hello Ad,
tnx for your reply,
the problem is that I don't want any whitespace nor backslashes in the output. Your patch results in
0.1, 0.2, 0.3 while i need
0.1,0.2,0.3
I need this for constructing data to send to an OSC application that is not my own.
Grtz
Don't have max open at the moment. Sprintf should do it but try using 'combine' which is a bit simpler:
combine f , f , f
Ah, just seen what's confusing you. The backslashes you see in a message box are just to let you know it's a single message. Route the output to a print object to see what's truly there (i.e. no backslashes).
ah yes indeed, stupid actually ;-)
tnx!
... stupidness again :
i need to get rid of the backslash.
Following these previous posts, indeed the message includes a backslash, but in the Max window we have the correct message we want : only comma, no backslash
But if i want to "truly" send this message into anything else - let's say, the [textedit] from Safairien example, the backslash remains everywhere...
i need to send this type of adress :
http://www.worldweatheronline.com/v2/weather.aspx?q=59.36,-12.43
Even if i try to send it manually in Safairien, Max window tells : "jweb : extra arguments for message "read"
...?
Did try with everything i could - regexp, sprintf, combine, [tosymbol] with @separator argument ...
But Max6 automatically removes the backslash in front of a comma, and i can't find the solution. Tiring.
Up, I have the same problem, just to visualize the messages (normal text using append) in textedit.
Using Textedit, set parameter mode on