• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Exit Repeat [Was: [Case Statements]]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exit Repeat [Was: [Case Statements]]


  • Subject: Exit Repeat [Was: [Case Statements]]
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 12 Feb 2002 10:14:37 -0500

>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.

  • Follow-Ups:
    • Re: Exit Repeat [Was: [Case Statements]]
      • From: Christopher Nebel <email@hidden>
    • Re: Exit Repeat [Was: [Case Statements]]
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Scripting OSX Mail App
  • Next by Date: Suffixit and Unsuffixit
  • Previous by thread: Re: Scripting OSX Mail App
  • Next by thread: Re: Exit Repeat [Was: [Case Statements]]
  • Index(es):
    • Date
    • Thread