Delete Messages with Category "Expiring" if Older Than 7 Days

R

Rick.Cogley

Hello -

I'm new to Mac, Entourage and AppleScript, so I hope this is the right
place to come for assistance, and that one of you will be kind and
offer some. :) I am running OS/X 10.4.5, Entourage 2004, 11.2.3
(060209), AppleScript 1.10.4.

I have Entourage using Rules to pull mail from two IMAP mailboxes,
moving it into the local store "on my computer". Prior to doing the
move to the local store, the rules above those move rules (which seem
to have to be last) are looking for "from" and "reply to" email
addresses (depending on situation) and assigning the incoming mail a
category called "Expiring".

The concept I am trying to implement is generally, to mark certain
incoming mail with a category, and then act upon it automatically. I am
thinking I would like to run something daily, which checks if mails in
the local store are set to "Expiring" or not, and delete them if they
are older than 7 days (for example).

I noticed that I can create a custom view which shows the set of
messages which I would like to delete, but I found that I cannot record
AppleScript in Entourage. So, worst case, I can just click the view, do
a select-all, and delete. But, it would be cool to do a scheduled
script.

Am I on the right track? Can AppleScript actually record in Entourage
but I am missing it? In AppleScript can I manipulate a data set that is
presented by a custom view, and then delete those messages?

Any advise is much appreciated. Thank you very much indeed.
 
A

Allen Watson

Hello -

I'm new to Mac, Entourage and AppleScript, so I hope this is the right
place to come for assistance, and that one of you will be kind and
offer some. :) I am running OS/X 10.4.5, Entourage 2004, 11.2.3
(060209), AppleScript 1.10.4.

I have Entourage using Rules to pull mail from two IMAP mailboxes,
moving it into the local store "on my computer". Prior to doing the
move to the local store, the rules above those move rules (which seem
to have to be last) are looking for "from" and "reply to" email
addresses (depending on situation) and assigning the incoming mail a
category called "Expiring".

The concept I am trying to implement is generally, to mark certain
incoming mail with a category, and then act upon it automatically. I am
thinking I would like to run something daily, which checks if mails in
the local store are set to "Expiring" or not, and delete them if they
are older than 7 days (for example).

This is certainly possible. See below.
I noticed that I can create a custom view which shows the set of
messages which I would like to delete, but I found that I cannot record
AppleScript in Entourage. So, worst case, I can just click the view, do
a select-all, and delete. But, it would be cool to do a scheduled
script.

Am I on the right track? Can AppleScript actually record in Entourage
but I am missing it? In AppleScript can I manipulate a data set that is
presented by a custom view, and then delete those messages?

What you want to do can be done, but not quite as you envision it.
First: Entourage's AppleScript is not recordable (very, very few
applications are recordable, unfortunately). However, it is quite
powerful; you just have to write the script yourself (or get someone
like me to do it). Second: No, you can't manipulate a data set
presented by a custom view. However, you can create the same data set
within the script, without using a Custom View.

At the moment I can't take time to write such a script (I have a
meeting I must attend...)but maybe tomorrow...Unless someone else jumps
in.
 
R

Rick.Cogley

Hello Allen - thank you kindly, and of course I can wait. Much
appreciate your assistance, and I hope I can learn a bit about
AppleScript in the process.

Kind regards,
Rick Cogley
 
R

Rick.Cogley

Hello Allen -

Would this sort of script be run using a Schedule in Entourage?

Sincerely,
Rick Cogley
 
Top