scripting question, again

Apr 23, 2009 at 8:13pm

scripting question, again

let’s do it in the correct forum this time

Unless I misunderstood, again, I should be able to set the comment of an object with @comment.
Well, I can’t get it to work. If someone with more scripting chops than me could have a quick look, I would much appreciate it.

Thanks

– Pasted Max Patch, click to expand. –
#43511
Apr 23, 2009 at 8:19pm

just need to create outlet first, then use ‘sendbox’ to address it with attribute changing messages like so:

– Pasted Max Patch, click to expand. –
#156108
Apr 23, 2009 at 8:32pm

This is working nicely. So, there is no way of doing it with @comment at object creation…

Thanks

#156109
Apr 23, 2009 at 9:08pm

Not sure, I could be wrong… but my guess was that object creation only allows certain messages which are absolutely essential to initialization. it may be possible with multiple ‘script’ messages placed within one message(kind of like when you do ‘script hide [varname1], script show [varname2]‘) i didn’t try this, though… seemed like the same thing as using ‘sendbox’… keep me posted if you find out differently.

#156110
Apr 24, 2009 at 2:23pm

hi,

here’s another way.

Luis Marques

– Pasted Max Patch, click to expand. –
#156111
Apr 24, 2009 at 5:28pm

thanks for that Luis, I hadn’t used pattrforward before. I will have to dive into that one, seems very interesting on first glance.

#156112
Apr 24, 2009 at 9:42pm

oh! wait a sec. just discovered this, perhaps it’s exactly what you were asking for?

– Pasted Max Patch, click to expand. –

i guess you can probably directly name the object-type as it is named from the object-palette(without using ‘newobj’; i was under the impression that you could only do this with UI objects…)

#156113
Apr 24, 2009 at 10:11pm

that’s exactly what I was looking for. perfect!
I don’t think it makes a big difference one way or another, but I do prefer the concise way if possible…

that’s two new tricks in my bag from this thread… Smile yea!!

#156114

You must be logged in to reply to this topic.