AppleScripting Archiving to Finder of Mail Messages

Joined
Jan 7, 2012
Messages
1
Reaction score
0
Points
1
Location
Cheltenham UK
Your Mac's Specs
Many and varied G3 - 2x Quadcore Xenon
I want to script Archiving of Mail Messages.
I am new to AppleScript but have 18 years experience of scripting FileMaker.
I have found scripts that enable one to archive the contents of a Mail folder but this is NOT what I want to do. (and the scripts are locked down as Applications so I can not extract code)
I have also found scripts that will enable to create a new Message and send it. Again NOT what I want to do.

Proposed WorkFlow
While in Mail: create and finish Message
Instead of clicking Send in Mail, I want to fire a script that:
Send the 'currently open' Message
Save the Message in Raw Message Source to a Finder Folder of my choice (ie: within my Finder files relating to a project (say))
Move the Message within Mail to a Folder called 'Delete in 6m' (say)

This workflow moves the decision making and archiving to the moment of message creation.

Other variants would:

While viewing an Inbox Message would:
Close Message
Save the Message in Raw Message Source to a Finder Folder of my choice
Move the Message within Mail to a Folder called 'Delete in 6m' (say)
(this could be the same script as above with an IF test that checks some property such as who the recipients are)

OR

Send
Move the Message within Mail to a Folder called 'Delete in 6m' (say)


I can not find a way of:
Q1 sending the 'currently open' message
Q2 saving the 'currently open' message to a Finder folder
Q3 addressing the 'currently open' message in any way
Q4 any idea on a suitable IF test that will be reliable (considering that I use several accounts and an outgoing e-mail could contain one of my e-mail addresses as a recipient.)

I am sure that AppleScript is the tool to use, but have to say that it is impenetrable for a newcomer. (Quite unlike FileMaker)
Q5 Can anyone recommend a book or tutorial for someone with years of programming experience but who has not got a clue about the library of instructions available OR the syntax for these instructions.

This is an enquiry for my own use.


Technical
PowerBook G4 running OS 10.4.11
Mail 2.1.3
AppleScript Editor 2.1.2

Also MacPro 2xquad core - but everything has to work on the PowerBook

Happy New Year to all
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top