To insert a repeat routine into a script:

Select the name of the variable that will contain a list of items to process. Optionally, you may select a list of items, but be sure to include the opening and closing curly brace characters in the selection.

Control-click in the selected area.

Choose the desired repeat routine option from the Repeat Routines submenu:
Process Every Item: Processes every item of a list.
Special Case First & Last: Processes every item of a list while providing conditions for the first and last items in the list.
Special Case First Item: Processes every item of a list while providing a condition for the first item in the list.
Special Case Last Item: Process every item of a list while providing a condition for the last item in the list.