Getting object name with its output.
Hello,
This one should be simple, but I found only the solutions for very specific types of situation (patchers, js etc)
I am creating a tone of [slider]
s by [thispatcher]
and script messages. In script message the varname is "duration", so I am creating objects called "duration1", "duration2", "duration3" etc..
I also have option to delete these sliders. So, for example, at the end of the session I have objects "duration1", "duration3" and "duration 7".
I rely on [pvar]
object to retrieve the [slider]
's value. I am getting its name from the [hover]
object.
However sometimes I have to get [slider]'s value indirectly, i.e. by some external bang.
For example, when I delete a slider
, I need to know its name to retrieve it's value.
Here's the question:
How to get object's name together with its data? How to NOT do this in js? I want to receive it in the form of list, for example "duration3 45". I also desperately want to get its name to track its box in the patcher's window.
cheers!
maybe, if i understand well
hth
zz
Thank you! It still however misses the problem, because when I click on "messy
" more times than one, the newly generated objects are named "messy[1]", "messy[2]" and so on, and because they are named differently than "messy"
they are not seen by script connect [message]
and they do not get connected with the funny-named object.
What I want to get is a kind of report of the name of the newly created object by script newobject
message.
Here I used counter to solve it, but this is ineffective because when I have i.e. 100 messy
objects, I delete the 81st and I create the new one, it will be named "messy81" and counter will send the message about "messy 101".
playing with getattr varname, i should try with a coll. And name myself the varname of the sliders. Hover is nice, i don't know how you think the use of the sliders. In progress:
;-( Max crash when deleting many objects by uzi: blue message "chainapply" in max console. Too fast ?
try deferlow between uzi output and thispatcher to avoid crashing
Thank you very much, getattr should be what I needed!
h(appy)tohelp ! deferlow after uzi to delete makes the job. But Max doesn't like to have to rename itself, incrementing a varname, and than delete. I need to see deeper to have "safe" working thing