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: cricket <email@hidden>
- Date: Mon, 16 Sep 2002 16:15:54 -0700
This gets the full content of the message, not the selected text. We're
working on exposing selected text somewhere down the road.
- cricket
On Tuesday, September 3, 2002, at 09:40 PM, John Delacour 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
_______________________________________________
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.