Repeat While
The Repeat While form of the Repeat statement repeats a group of statements as long as a particular condition, specified in a Boolean expression, is met.SYNTAX
repeat while Boolean [ statement ]... end [ repeat ]whereBoolean is an expression whose value is
trueorfalse. The statements in the loop are repeated until Boolean becomesfalse. If Boolean isfalsewhen entering the loop, the statements in the loop are not executed.statement is any AppleScript statement.
EXAMPLE
The following example numbers the paragraphs of a document with the Repeat While form of the Repeat statement.
tell document "List" set numParagraphs to (count paragraphs) set paragraphNum to 1 repeat while paragraphNum � numParagraphs set paragraph paragraphNum to (paragraphNum as string) & " " ÿ & paragraph paragraphNum set paragraphNum to paragraphNum + 1 end repeat end tell