• 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
size of rich text messages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

size of rich text messages


  • Subject: size of rich text messages
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 29 Sep 2004 00:14:09 -0700

I sent the following message to a friend of mine; I had formatted it as Rich Text in order to keep the fonts, sizes, and styles in my original Applescript.

Content-Type: multipart/alternative; boundary=Apple-Mail-11-22139230


--Apple-Mail-11-22139230 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed

I realize that you don't use a Mac any more, and don't know much (if
anything) about Applescript, but I think you can follow this code, and
might get a small chuckle out of it.

Can you think of any other diphthongs that begin words for me to add to
the list?

-- Michelle

set originalText to "Now is the time for all good queers to come to the aid of their parties."
set tempResult to {}
set vowels to {"a", "e", "i", "o", "u"}
set diphthongs to {"sh", "th", "ph", "ps", "qu", "fl"}
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 text 1 through 2 of thisWord is in the diphthongs then
			set n to 2
		else
			set n to 1
		end if
		set thisWord to (text (n + 1) thru end 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
display dialog resultingText

--
"I'll do the best I can do because that's the best I can do!"

The resulting file is 32K bytes. To see why, here's the second line of the code (set tempResult to {}) with the Rich Text tags:


</smaller></smaller></smaller></ color><bold><fontfamily><param>Helvetica</ param><smaller><smaller><smaller>set</smaller></smaller></smaller></ fontfamily></bold><color><param>FFFF,0000,0000</ param><smaller><smaller><smaller> </smaller></smaller></smaller></color><color><param>0000,0000,FFFF</ param><smaller><smaller><smaller>tempResult</smaller></smaller></ smaller></color><color><param>FFFF,0000,0000</ param><smaller><smaller><smaller> </smaller></smaller></smaller></ color><bold><fontfamily><param>Helvetica</ param><smaller><smaller><smaller>to</smaller></smaller></smaller></ fontfamily></bold><color><param>FFFF,0000,0000</ param><smaller><smaller><smaller>

-- Michelle

--
if u cn rd ths u cn gt a gd jb, bt if u rt lk ths u r a mrn.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: GUI screen capture?
  • Next by Date: Re: Getting human-understandable time from iCal
  • Previous by thread: RE: Create record in FileMaker
  • Next by thread: creating logs of all actions performed
  • Index(es):
    • Date
    • Thread