Lesson 11. The Repeat Loop

repeat (Forever)

repeat [number] times

repeat with [loop variable] from [start value] to [stop value]

repeat with [loop variable] in [list]

until and while Loops

What’s Next?

Now that you’ve learned about conditionals, you’re ready to get into really powerful scripting.

Most information you encounter in the workaday world comes in the form of collections of individual items of data, all of which have some sort of standardized organization or structure, such as the telephone book with its gigantic collection of names, addresses, and telephone numbers. These collections cry out for management in a repetitive process, where each item in succession is run through the same mill. It wouldn’t be very useful if you had to ...

Get Apple Pro Training Series: AppleScript 1-2-3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.