• 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: Since Apple Listens to this List... [Case Statements]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Since Apple Listens to this List... [Case Statements]


  • Subject: Re: Since Apple Listens to this List... [Case Statements]
  • From: Michelle Steiner <email@hidden>
  • Date: Mon, 11 Feb 2002 22:01:51 -0700

On 2/11/02 8:41 PM, Paul Berkowitz <email@hidden> wrote:

>> Well, I do believe I can live without case, I'd *love* to see 'next repeat'
>> though. Loop bodies are much tidier for it.
>
>I agree, but just in case you don't already know this workaround - invented
>by Ray Robertson - which works just as well:
>
>
>repeat -- any sort of repeat loop
> repeat 1 times
> --blah blah
> if something = whatever then exit repeat
> -- more blah
> end repeat
>end repeat

How about this:

Repeat -- any sort of repeat loop

if <condition for next repeat> then
else
--do something
end repeat

Example: If you want to do something only with words that end with "ing"

set WordsToBeEvaluated to {"sit", "sitting", "run", "running", "run",
"jumping", "jump", "walking", "bark"}
repeat with thisWord in WordsToBeEvaluated
if not (text -3 through end of thisWord is "ing") then
else
display dialog thisWord -or whatever is needed
end if
end repeat

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------
_______________________________________________
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: shell script with top "can't get terminal attributes"?
  • Next by Date: Re: Since Apple Listens to this List...
  • Previous by thread: Re: Since Apple Listens to this List... [Case Statements]
  • Next by thread: Re: Since Apple Listens to this List... [Case Statements]
  • Index(es):
    • Date
    • Thread