• 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: Exiting a repeat
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exiting a repeat


  • Subject: Re: Exiting a repeat
  • From: Emmanuel <email@hidden>
  • Date: Tue, 14 Jan 2003 16:47:49 +0100

At 9:50 AM -0500 14/01/03, Steve Suranie wrote:

HERE IS WHERE I GET STUCK - HOW DO I EXIT OUT OF THIS INSTANCE OF THE
REPEAT LOOP AND MOVE ON TO THE NEXT ITEM IN THE LIST

There is not one single better solution - only some tricks.

Some use this one:

--------------------- pseudo-code
repeat
try
if [must process item] then
[process it]
else
error "next repeat"
end
on error s
if s is not "next repeat" then error s
end
end
--------------------------------


Others use that one:

--------------------- pseudo-code
repeat
repeat 1 times
if [must process item] then
[process it]
else
exit repeat -- the internal repeat, that is
end
end
end
--------------------------------


HTH,
Emmanuel
_______________________________________________
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.

  • Prev by Date: Re: Script to get default browser?
  • Next by Date: Re: Date Help - D&T stamp w Short dates
  • Previous by thread: RE: Exiting a repeat
  • Next by thread: script to change desktop picture
  • Index(es):
    • Date
    • Thread