Re: Applescript and email
Re: Applescript and email
- Subject: Re: Applescript and email
- From: Christian Boyce <email@hidden>
- Date: Thu, 21 Oct 2010 08:58:28 -0700
get the new (or unread)messages in my email save them as text files on my desktop (From, Subject and Body) (title could be a timestamp) then delete the messages from my inbox (or mark them as read) Virgil, if you want the script to work automatically from now on make a Mail Rule that triggers a script.
Something like this:
using terms from application "Mail" on perform mail action with messages the_messages for rule theRule repeat with the_message in the_messages tell application "Mail" if read status of the_message is false then set the_content to content of the_message --more stuff here end if end tell end repeat end perform mail action with messages end using terms from
The rule can also set the status to "read" for you (or delete the messages if you'd rather).
If you just want to select a bunch of messages and then run a script here's a start for that.
tell application "Mail" --select a bunch of messages first set the_messages to the selection repeat with a_message in the_messages if read status of a_message is false then set the_content to content of the_message -- do your stuff end if end repeat end tell
Get it?
-- Christian Boyce Christian Boyce and Associates, Mac, iPhone, and iPad Consultants 310-452-3720
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden