• 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
igPay atinLay, first pass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

igPay atinLay, first pass


  • Subject: igPay atinLay, first pass
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 21 May 2003 14:47:53 -0700

set originalText to "Now is the time for all good men to come to the aid of their parties."
set tempResult to {}
set vowels to {"a", "e", "i", "o", "u"}
set translationList to the words of the originalText

repeat with thisWord in translationList
if the first character of thisWord is in the vowels then
set tempResult to tempResult & (thisWord & "yay" as text) as list
else
if (character 1 of thisWord is "t" or character 1 of thisWord is "c") and character 2 of thisWord is "h" then
set n to 2
else
set n to 1
end if
set thisWord to (text (n + 1) thru -1 of thisWord) & (text 1 thru n of thisWord) & "ay" as text
set tempResult to tempResult & thisWord as list
end if
end repeat
set {TID, text item delimiters} to {text item delimiters, space}
set the resultingText to tempResult as text
set text item delimiters to TID
resultingText

-->
"owNay isyay ethay imetay orfay allyay oodgay enmay otay omecay otay ethay aidyay ofyay eirthay artiespay"

--Michelle

--
Give Peace A Chance.
_______________________________________________
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: igPay atinLay, first pass
      • From: Bill Cheeseman <email@hidden>
  • Prev by Date: Re: Decimal separator.
  • Next by Date: Scripting Mail
  • Previous by thread: Re: Finder error duplicating AppleWorks file
  • Next by thread: Re: igPay atinLay, first pass
  • Index(es):
    • Date
    • Thread