How do i use a patcher argument in a scripting name (varname)?

Griotspeak's icon

my google foo has failed me.

How do i use #1 in a scripting name? (or more precisely, is there a way that doesn't involve loadbang and "varname #1-name"?)

seejayjames's icon

I don't know if that's possible. Wizards chime in?

Roman Thilenius's icon

good question. normally i would think that when you split the # from 1 and
sprintf them together when sending the script command it could work for
max v4 style scripting?

[t '#'] [t 1]

[sprintf %s%s]

[list script new user external s 0 0 0 0 0 0]

[thispatcher]

i have no max here to try. it might end up as [external $0].

-110

Emmanuel Jourdan's icon

I've a question… Why? The varname is local to the patcher, so there's no need to put a #1 in it, is there?

Griotspeak's icon

i had an abstraction that i wanted to de-encapsulate so that objects would have the varnames sequentially numbered.

also, to stay consistent with my naming scheme.