Where is the mistake?

This block is not working

blocks(3)

Please, tell me where is my mistake. My apologizes.
Thank you.

Works for me:

screenbuttonelements

but this might not be what you want?

If you wanted the button texts returned then use the button.text block instead:

blocksbuttontext

screenbuttontext

Thank You. I Have understood. But I wanted use the WhenAnyButtonIsClicked and I need to know wich button the user has clicked.

Why not ask that question in the first place ? :wink:

Do you want to know the index in the global list of the button that was clicked (1-3)?
If so, use the index in list block with the global list of button components and the click event component.

Thank you. Very useful. I have solved my problem: now is all ok and I have minimized the instruction’s code (block).

Can you show what your end result was so others can learn.

Here my solution

Blist contain 24 Button named B1, B2, …, B24
nB is the index in the list of the button clicked by the user.
It is working.
Some hint?
Bye.

If you want to squeeze out more code,
you can use the lookup in pairs block
to map choice into color from a global
table (list of lists) (choice,color)

You can also code a small procedure to take the color as a parameter
and apply it to the background color of buttons nb and nb+1

This is a slight refactor of your Notifier blocks,
barely worthwhile …

Ok. Very nice. Is it possible make copy&paste of yours blocks in my project?
Thank you

Sorry, I was in a rush and did not do block-level downloads of the procedures and events,
which would have been pasteable into the Blocks Editor.

I guessed wrongly that a complete blocks download would be draggable, but that's not the case, I see now.

It's only a couple of little procedures, you should be able to do it in half an hour.