• 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
Re: Silly repeat question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Silly repeat question


  • Subject: Re: Silly repeat question
  • From: Alex Zavatone <email@hidden>
  • Date: Thu, 26 Aug 2010 14:32:43 -0500

Hmmm.  This doesn't seem much better than an if/then statement to check a condition.  Is it?  Am I missing something?

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:
>
> ----
> repeat -- your loop
> 	repeat 1 times
> 		-- blah blah
> 		-- when you want "next repeat" you do:
> 		if [ whatever ] then exit repeat
> 	end repeat
> end repeat
> ----
> repeat -- your loop
> 	try
> 		-- blah blah
> 		-- when you want "next repeat" you do:
> 		if [ whatever ] then error "next repeat"
> 	on error "next repeat" -- will selectively trap that error, other errors will propagate
> 	end try
> end repeat
> ----
>
> Emmanuel

 _______________________________________________
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

  • Follow-Ups:
    • Re: Silly repeat question
      • From: "Mark J. Reed" <email@hidden>
    • Re: Silly repeat question
      • From: "email@hidden" <email@hidden>
References: 
 >Silly repeat question (From: Alex Zavatone <email@hidden>)
 >Re: Silly repeat question (From: Nathan Greenstein <email@hidden>)
 >Re: Silly repeat question (From: Emmanuel LEVY <email@hidden>)

  • Prev by Date: Re: Silly repeat question
  • Next by Date: Re: Silly repeat question
  • Previous by thread: Re: Silly repeat question
  • Next by thread: Re: Silly repeat question
  • Index(es):
    • Date
    • Thread