Forums > MaxMSP

how to deal space in folder and file name in max external [shell], [regexp] or [sprintf]?

Oct 24 2009 | 1:24 am

Dear users,

my problem is how to correctly send following messages to the [shell]?

interactive additive synth/sonic prism.scd
interactive additive synth/sonic_prism.scd
interactive_additive_synth/sonic prism.scd

In [shell] does not work a space.
I must send a message with [sprintf], but the a space in truncate a complete path and file name.

I have also tried [regexp] with substitue. However, if a strng has no space, [regexp] does not produce the original string but nothing!

The problem is, there can be a space and also can be no space!

I tried alone some days.
I have not found a solution.


Oct 24 2009 | 7:25 am

Does it help to put it between quotes?

-- Pasted Max Patch, click to expand. --

In this regard, the tosymbol object is useful.

Oct 24 2009 | 4:25 pm

Alternately, he could add a backslash before the spaces, although enclosing the thing in double quotes would be easier in a situation where he always dealt with the same kind of data….

Oct 24 2009 | 10:44 pm

The two methods, I had tried.
Can you give a patch instead of a recommendation?

My actual patch is as follows:

— Pasted Max Patch, click to expand. —
Oct 25 2009 | 1:32 pm

this is how to format spaces with spritf (culled straight from the helpfile)

— Pasted Max Patch, click to expand. —
Oct 25 2009 | 1:51 pm

thanks, I solved the problem.

Viewing 6 posts - 1 through 6 (of 6 total)

Forums > MaxMSP