Re: Help! Need to get text from OS X Mail to Tex-Edit...
Re: Help! Need to get text from OS X Mail to Tex-Edit...
- Subject: Re: Help! Need to get text from OS X Mail to Tex-Edit...
- From: John Delacour <email@hidden>
- Date: Wed, 4 Sep 2002 05:40:41 +0100
At 4:47 pm -0600 3/9/02, Robert Parker wrote:
I'm trying to create an AppleScript (that I execute from the
AppleScript menubar in OS X) that'll take the currently selected
email (using OS X's native email app) and transfer the contents into
a Tex-Edit document automatically so I can do some stuff to the text.
Working with Tex-Edit is easy since it's recordable. In fact, I've
already finished this part of my project.
The problem is that the email app in OS X is apparently not
recordable so I'm REALLY having a difficult time getting the
selected email text into a TexEdit document.
I can see no need for any third party utility, at least in 10.2. The
script below will create and open a text file containing the text of
the front message:
tell app "Mail" to set mText to content of item 1 of (get selection)
set f to ((path to temporary items) as string) & "temp.txt"
open for access file f with write permission
set eof file f to 0
write mText to file f
close access file f
tell app "Finder" to open file f
-- JD
_______________________________________________
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.