igPay atinLay, first pass
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.