• 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: Re: Repeat With question (newbie level)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Repeat With question (newbie level)


  • Subject: Re: Re: Repeat With question (newbie level)
  • From: email@hidden
  • Date: Wed, 14 Feb 2001 20:52:51 EST

Michelle Steiner said:

>repeat with currentLetter in the alphalist

There is a caveat with this approach (which is a correct and very good
approach BTW, being standard Applescript and all). A script will demonstrate:

set alphaList to {"a", "b", "c"}

repeat with aLetter in alphaList
if aLetter is equal to "b" then beep 1
if aLetter is "b" then beep 1
if aLetter = "b" then beep 1
if aLetter is equal to "b" then beep 1
if (aLetter as string) is equal to "b" then beep 1 -- only this line
makes a beep
end repeat

It is entirely likely that many of you have an osax installed which quietly
does a coercion, making this problem not show on your machine but causing
silent and frustrating to diagnose problems when moved to other machines. My
osax are on the lite side - Tanaka's, Akua, Jon's, Sigma's, Satimage.

Jeff Baumann
email@hidden
www.linkedresources.com

Congratulations to Charles who answered the last trivia question.
Next Trivia question - what is the linking element amongst Thalia Menninger,
Chatsworth Osborne, Jr., and Mr. Pomfritt?


In a message dated 2/14/01 12:53:27 PM, Michelle Steiner wrote:

>On 2/14/01 8:51 AM, Bill Planey <email@hidden> wrote:
>
>>Is there a way to set each alphabetic character into a list
>>{"a", "b", "c", "d", etc.} and have the variable be redefined
>>to the next letter in the list upon the completion of a step
>>until the last letter has been used? I know this is possible
>>with numbers (ie,: Repeat with i from 1-9), but how about letters?
>
>set the alphalist to {"a", "b", "c", "d"}
>repeat with currentLetter in the alphalist
> display dialog currentLetter
>end repeat


and in a message dated 2/14/01 12:53:27 PM, g3pb wrote:

>set ans to ""
>set chList to {"a", "b", "c", "d"}
>repeat with anitem in chList
> set ans to ans & anitem
>end repeat


  • Prev by Date: On apple event...
  • Next by Date: parents ScriptEditor and Smile
  • Previous by thread: Re: Repeat With question (newbie level)
  • Next by thread: Re: Re: Repeat With question (newbie level)
  • Index(es):
    • Date
    • Thread