• 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
Or TextEdit? [WAS: Re: Scripting Mail.app]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Or TextEdit? [WAS: Re: Scripting Mail.app]


  • Subject: Or TextEdit? [WAS: Re: Scripting Mail.app]
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 21 Jan 2002 13:35:26 -0800

On 1/21/02 1:04 PM, "J.B. Stewart" <email@hidden> wrote:

> Has anyone had any success opening downloaded emails in the Mail.app?
> The following doesn't seem to work.

TextEdit is rather comical. It supposedly implements the Text Suite and a
bit more, but how do you get at the content of a document? There is no
'content' property, just 'text elements, but you can't get

text 1 thru -1 of document 1

The only thing I was able to get was

text 1 of document 1

! which turned out to be about 1 1/2 lines (paragraphs) of a 900-line
document. 182 characters, to be precise.

text 2 of document 1

errored, as well it might.

On the other hand, you can get

path of document 1

which results in the unix POSIX form with slashes, not colons. Why?

Does anyone other than I get the impression that the applescripting of
Apple's own OS X apps seems to have been done by some Unix programmers who
tried, but not not too hard, to learn a bit of AppleScripting in about 1/2
hour under duress when told to by some senior management person? Maybe they
need a few days' paid leave to learn a bit from Sal, or Bill Briggs'
tutorials? They evidently didn't consult the AppleScript team down the
corridor...

Using the read/write scripting addition works just fine on .txt files. I
haven't dared try it with .rtf files yet. I suspect that won't work so well.

--
Paul Berkowitz


  • Follow-Ups:
    • Re: Or TextEdit? [WAS: Re: Scripting Mail.app]
      • From: Christopher Nebel <email@hidden>
References: 
 >Scripting Mail.app (From: "J.B. Stewart" <email@hidden>)

  • Prev by Date: Scripting Mail.app
  • Next by Date: Re: Perl in AppleScript Reference
  • Previous by thread: Scripting Mail.app
  • Next by thread: Re: Or TextEdit? [WAS: Re: Scripting Mail.app]
  • Index(es):
    • Date
    • Thread