But that's exactly what lucid's example does
Or do you mean, you have a list of e.g. 20 different objects, and you want to loop through them? Then just create an array "names" that you fill with the names of your objects, and a global variable "selector"
then do:
+ On key Shift pressed
-> Add 1 to global 'selector'
++ Is global 'selector' greater than 20
-->set global 'selector' to 1
+ On left click
-> create object names(global('selector')) at mousex, mousey
(this is the action "Create object by name")