Buttons and while

There are two kinds of FOR EACH loop blocks.

  • one of them loops over each item in a list
  • the other loops over numbers from 1 to some other number.

You need the second kind of loop.
Use it with an index number from 1 to the length of list of your button list.
(If your lists have different lengths, use the shorter length.)
Use the SET ANY BUTTON.TEXT block with SELECT LIST ITEM blocks
for the getting and setting sides.

Sample project: