Re: Silly repeat question
Re: Silly repeat question
>
> On Aug 26, 2010, at 1:48 PM, Emmanuel LEVY wrote:
>
>> yes, so there are various tricks, mainly the "repeat 1" trick and the "error "next repeat" " trick:
>>
On Aug 26, 2010, at 12:32pm, Alex Zavatone wrote:
> Hmmm. This doesn't seem much better than an if/then statement to check a condition. Is it? Am I missing something?
What could be better than an if/then statement? When using a "next repeat" command there's bound to be a conditional expression somewhere.
Here's another illustration of the repeat 1 trick.
The Next repeat command (if such an animal existed in appleScript) would look like this:
if foo < 0 then next repeat
And there wouldn't be a need for the inner repeat loop. But you would still need the if/then
repeat with x in {1, 2, 3, 5, 6, 7}
repeat 1 times
set foo to x - 5
if foo < 0 then exit repeat
display dialog x
end repeat
end repeat
HTH,
ES _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden