Re: scripting 'mail' from OS X
Re: scripting 'mail' from OS X
- Subject: Re: scripting 'mail' from OS X
- From: Michelle Steiner <email@hidden>
- Date: Wed, 20 Mar 2002 13:05:51 -0700
- Resent-date: Wed, 20 Mar 2002 23:07:39 -0700
- Resent-from: Michelle Steiner <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: email@hidden
On Tuesday, March 19, 2002, at 01:54 AM, cricket wrote:
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
I read messages opened in a separate window.
In emailer, I could write
tell application "Claris Emailer"
tell the front window
if its class is in (received message window, outgoing message window)
then
set the selectedMessage to its displayed message
set the Messagetext to the content of the selectedMessage
else
--error handler
end if
end tell
end tell
I have the preview window closed completely. One of the things I miss
in the UI, BTW, is the ability to navigate from one message in an open
window to the next.
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.
A compose window is the one I'm typing in, right?
And again, in Emailer
tell application "Claris Emailer"
tell the front window
if its class is in (received message window, outgoing message window)
then
set the selectedMessage to its displayed message
set the content of the selectedMessage to the Messagetext
else
--error handler
end if
end tell
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.
*nod* I'm still trying to understand those.
What I'm trying to do is convert an email script that unwraps text with
hard returns in it. But I can't figure out how to identify the message
to the script, if it's a received message.
--Michelle
We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
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.