Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Newb needs help with simple Applescript for Mail

Newb needs help with simple Applescript for Mail
Thread Tools
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jan 2, 2005, 04:10 AM
 
Hi,

This is my very first attempt at an Applescript. Be patient. Don't laugh.

I really like Thunderbird's 'Smart' folders and wanted to emulate it in Mail app.

I have a rule set up which copies all mail less than one day old in to a folder named 'Today's Mail'. Other rules then filter mail into various folders but this means that I have one folder with a copy of all todays mail in it.

All I want to do is ensure that any mail received before 'Today' is moved to the trash automatically.

Obviously this should be very simple to do but I can't make it work...

Here is my effort:

Code:
on perform_mail_action(info) tell application "Mail" move eachMessage received before theDate current_date to the mailbox "Trash" end tell end perform_mail_action

I don't get any errors running or compiling this in Apple's Script Editor but it just doesn't work.

I want to invoke the script as part of a Mail Rule.

Help!

(Stop Laughing)

Thanks

Simon
London Uk
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:24 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2