My delete aged msg script - broke?
My delete aged msg script - broke?
- Subject: My delete aged msg script - broke?
- From: martin <email@hidden>
- Date: Sun, 15 May 2005 13:50:27 -0700
I cobbled together the following script to delete msgs from my mail
app. I was attempting to dupe one that I had used with emailer. But
with the new mail app it seems to operate differently than it did
with mail app prior to tiger. Much longer to complete and much more
activity in 'activity viewer' window.
If someone would point me in a productive direction I'd be grateful.
Martin
<mydeleteagedmsgs.scpt - pasted from script editor>
set deleteboxes to {"clayart", "applescript", "toyota", "woodfire",
"bamboo", "sf", "marxism", "lbo-talk", "mactalk", "xlist", "nettime"}
tell application "Mail"
set localMailboxes to every mailbox
if ((count of localMailboxes) is greater than 0) then
repeat with thismbox in localMailboxes
if name of thismbox is in deleteboxes then
my deleteoldmessages(thismbox)
end if
end repeat
end if
end tell
on deleteoldmessages(mboxname)
tell application "Mail"
set deletedate to (current date) - 2 * days
set thislistmsgs to every message of mboxname
repeat with thismsg in thislistmsgs
try
if date sent of thismsg is less than deletedate then
delete thismsg
end if
on error
end try
end repeat
end tell
end deleteoldmessages
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden