Exit Repeat [Was: [Case Statements]]
Exit Repeat [Was: [Case Statements]]
>
and if you're wondering "what if I want to escape the outer repeat loop?" :
>
>
set checked to false
>
repeat -- any sort of repeat loop
>
repeat 1 times
>
--blah blah
>
if something = whatever then exit repeat
>
-- more blah
>
if somethingElse = totallyZonked then
>
set checked to true
>
exit repeat
>
end if
>
--yet more blah
>
end repeat
>
if checked then exit repeat
>
end repeat
What am I missing? Why not just
set checked to false
repeat while checked is false
if myTest is not whatIwant then
set checked to true
end if
end repeat
It seems to me to be the best solution for an exit repeat from within as many nested ifs as you want.
Greg Strange
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.