As you know ObjectScript has no FOREACH system command nor system function.
But it has a wide room for creativity.
The task is to loop over a global or local array and do something FOR EACH element.
There are 2 possible solutions:
- creating a macro that generates the required code sequences
- creating an Extended Command to perform the action.