Chapter 19. Control
Control structures are the basis of a computer program's overall logic and "intelligence." They dictate the flow of a script. They are not commands; they are the signposts that describe how commands should be treated. They tell AppleScript how to decide what command should be executed next, or what to do if a command fails at runtime. They also modify how certain commands and operators are interpreted.
![](images/tip_yellow.jpg) | When typing any block in this chapter, in the termination line just type the word end. AppleScript fills in the missing term after compilation. (So, for example, don't type end if; just type end.) This shortcut saves time and is helpful for confirming that you have correctly structured your blocks. |
|
![](images/pixel.jpg) |