Carriage Returns in [sprintf]

MuShoo's icon

Does anyone know what the newline/carriage return escape character for max is? I've tried a number of things, none of which seem to work. I'm trying to format a comment box, to display:

Current File:
filename.wav
Current Folder:
thisisafolder/

But I can't do it if there's no carriage return character.

mzed's icon

Quote: MuShoo wrote on Tue, 05 August 2008 14:48
----------------------------------------------------
> Does anyone know what the newline/carriage return escape character for max is?

\n

It's the normal n with the escaped by another .

mz

MuShoo's icon

Tried that one, it doesn't seem to work.

Max Patch
Copy patch and select New From Clipboard in Max.

Chris Muir's icon

On Aug 5, 2008, at 2:48 PM, mushoo wrote:

> Does anyone know what the newline/carriage return escape character
> for max is?

As far as I know there's no way to do this. Using multiple comment
fields is how I usually approach this sort of thing.

-C

Chris Muir
cbm@well.com    
http://www.xfade.com

MuShoo's icon

Yeah, that's what I'm currently doing - the problem is that if someone happens to have a folder or filename that's atrociously long, it bleeds over into areas I don't want it to.

Luke Hall's icon

Could you not send the text to the [textedit] object instead of a comment as you can set sizes for those?

lh

MuShoo's icon

It seems like yes, I could, but I'm not sure I like that more or less than having text bleed around. With the textedit object, anything that goes past it's boundaries is just invisible, which could be bad. Say someone has two folders, "Folder A" and 'Folder B' but the last character has gotten cut off by the textedit window. That last character is the most important one for knowing where your files are going to end up.

Luke Hall's icon

Have a look at the [textedit] inspector, try turning the automatic scrolling on and the readonly off. This allows you to click in the box and use the arrow keys to scroll vertically, if you size it right you can fit the text line by line. This means you can get to the important end bit, it just might not be on screen straight away which is possibly what you're after. Another downside is that the user can accidentally type stuff in the box.

lh

Chris Muir's icon

On Aug 5, 2008, at 2:54 PM, mzed wrote:

> It's the normal
> with the escaped by another .

Really? I've never been able to get this to work.

Do you have a patch that will load a multi-line comment like the
original poster asked?

-C

Chris Muir
cbm@well.com    
http://www.xfade.com

fairesigneaumachiniste's icon

Use cr, and connect it to a [textedit] object. The text written into the text edit object will be formatted correctly.

Stephane Morisse's icon

For example in the stefan typewriter patch, when should I insert the [sprintf cr] object ?