Re: scripting 'mail' from OS X
Re: scripting 'mail' from OS X
- Subject: Re: scripting 'mail' from OS X
- From: cricket <email@hidden>
- Date: Tue, 19 Mar 2002 00:54:32 -0800
On Sunday, March 17, 2002, at 09:40 PM, Michelle Steiner wrote:
On Sunday, March 17, 2002, at 06:54 PM, cricket wrote:
In Mail, all mailboxes belong to accounts, so that's part of the problem.
Also, not everything you're trying to do here is possible in Mail yet,
like the opening of messages in the UI or deleting messages.
Is it possible to get the contents of an open message, not knowing where
it lies in the folders?
If the message is selected (but not opened in a separate window), you
could use something like this:
tell application "Mail"
set theSelectedMessages to the selection
repeat with eachMessage in theSelectedMessages
get content of eachMessage
end repeat
end tell
Is it possible to change the content of an open message window, and if
so, can it do it for a received message as well as a message being
written/drafted?
If it's a compose window yes, message window no.
If you have have only one compose window open, you could do something like
this:
tell application "Mail"
set content of compose message of message editor 1 to "New text"
end tell
Every open compose window consists of both a message editor and a compose
message. See the Mail dictionary for various properties and elements of
each. Much of the functionality of what you can do with the body of a
message editor is in the built-in Text suite for Cocoa applications.
- cricket
--Michelle
We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
----->
Software Entomologist/Mail for Mac OS X email@hidden
---------->
If you don't like this email message, write your Congressman
_______________________________________________
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.