Title: Re: Executing a Rule from a schedule?
On 23/2/04 10:15 pm, "Mark Goodman" <[EMAIL PROTECTED]> wrote:

> Very frustrating, using rules would be much easier for me. I have had a Mac
> for about 20 years and I have never got a handle on writing those damn
> AppleScripts. Now I am too old to learn anything new. :)
>
> Okay, so will one of you AppleScript gurus give me an example of how to
> create a script that would search in a particular folder for messages that
> are "XXX" days old that have a category of "XXXXXX", and move it to "XXXXXX"
> folder.
>
> ***********************************************************************
>
> This is what I am trying to do:
>
>> Example 1:
> Select messages in the "InBox" that are older than "30 days" and have a
> category that equals "Web Order" and move it to the "Orders" folder.

property daysOld : 30
property theCategory : "Web Order"
property theFolder: “Orders”

tell application "Microsoft Entourage"
    set theMessages to every message of folder "inbox" whose time sent < ((current date) - daysOld * days) and category contains {category theCategory}
    repeat with aMessage in theMessages
        move aMessage to folder theFolder -- assumes 'orders' is a POP folder at the top level
    end repeat
end tell


>
>
>> Example 2:
> Select messages in the "InBox" that are older than "30 days" and have a
> category that equals "Fax" and move it to the "Fax Archive" folder.

I’ll let you work that one out :)


--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Seen the Entourage FAQ pages? - Check them out:
  <http://www.entourage.mvps.org/toc.html>


Reply via email to