Or TextEdit? [WAS: Re: Scripting Mail.app]
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