Getting individual numbers out of long lists

Jonathan Hallstrom's icon

I have a 53-button display and I want to make sure all other buttons are turned off every time a new one is pressed. I've figured out how to use the zl.nth object to change the zero and one configuration of a 53-item list each time I press a new button, but can't figure out how to get the individual items out of the list in order to set the individual button states. The "set $n" message only works with lists up to 10 items. How can I pull out individual messages from a longer list and send them to individual buttons? (or is there an easier way to do it?)

Jonathan Hallstrom's icon

Duhh... unpack...

Bradley Korth's icon

There's also zl mth and zl nth. There's also zl indexmap if you want to figure out a list of specific indexes, like, pulling out only the 1st, 8th, 10th, and 30th.

Peter Ostry's icon

If your GUI allows it, you may consider a [matrixctrl] instead of individual buttons. This you can set to "one active per matrix" and don't need a reset/set action for a single button. [matrixctrl] has limited layout features, with enough space between the buttons and by deactivating unused buttons you may get what you want.