object name

Sep 19, 2008 at 3:28pm

object name

Hello ,

I’d like to name many objects.
I don’t want to use pattr’s

Is there a message, for example to name a number box?
I tryed “objectname something” without success.

thank you

max v2;
#N vpatcher 10 59 610 459;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 69 191 98 196617 objectname 147box;
#P number 70 210 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 1 0 0 0;
#P pop;

#39917
Sep 19, 2008 at 3:38pm

On 19 sept. 08, at 17:28, Derrick Giscloux wrote:

> Hello ,
>
> I’d like to name many objects.
> I don’t want to use pattr’s
>
> Is there a message, for example to name a number box?
> I tryed “objectname something” without success.

In Max 5, you can use the varname attribute. There’s also the “script
class yourvarname select 3 5″ message to thispatcher which also work
in Max 4 (look at the scripting subpatcher of thispatcher’s help
file). You might also want to consider using js to name the objects
it’s pretty easy to iterate through objects (this.patcher.apply()) and
set their name with the varname property.

HTH,
ej

#140757
Sep 19, 2008 at 3:56pm

Nice! Thank you Emmanuel.

#140758

You must be logged in to reply to this topic.