Re: How to get text of frontmost window in Mail?
Re: How to get text of frontmost window in Mail?
- Subject: Re: How to get text of frontmost window in Mail?
- From: Michelle Steiner <email@hidden>
- Date: Wed, 10 May 2006 14:06:04 -0700
On May 10, 2006, at 1:51 PM, Roger Howard wrote:
I just need to get the selected text of the front-most window (a
new message). Barring that, I need to get the full text of that
window... preferably as styled text, but I can live with string or
Unicode or what have you.
You can't get the selected text without using GUI scripting and the
copy menu command. However, you can get the full text with the
following code:
tell application "Mail"
set the MessageText to the content of item 1 of (the selection as list)
end tell
--
"I'll do the best I can do because that's the best I can do!"
_______________________________________________
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