Re: Scripting Eudora
Re: Scripting Eudora
- Subject: Re: Scripting Eudora
- From: John Delacour <email@hidden>
- Date: Wed, 13 Nov 2002 00:37:01 +0000
- Mac-eudora-version: 5.3a8
At 9:53 am -0800 12/11/02, Richard Jones wrote:
I have been trying to develop a script for Eudora 5.2, but the
commands Every Message or For Each Message or Mailbox returns
errors. I want to cycle through each mailbox, check each message,
compare the date sent and dispose of the message depending the date
sent.
I don't know how much mail you have, but you're going to run into
memory problems building a substantial list.
Here's a snippet to show how to get your list from a single mailbox
and move the candidates to the trash:
set trashdate to (current date) - (30 * days)
set the expireList to {}
tell application "Eudora"
set mb to a reference to mailbox 4
try
tell mb
repeat with i from 1 to count messages
set msg to (a reference to message i)
if my universal seconds of the msg is less than the trashdate then
set n to the id of the msg
copy (a reference to message id n) to the end of the expireList
else
exit repeat -- no more old messages
end if
end repeat
end tell
end try
repeat with i in expireList
move the contents of i to the end of mailbox 3
end repeat
end tell
--END
expirelist will look like this:
{message id 8.69961019E+8 of mailbox 4 of application "Eudora",
message id 6.5728863E+8 of mailbox 4 of application "Eudora", message
id 5.75993295E+8 of mailbox 4 of application "Eudora", message id
91491557 of mailbox 4 of application "Eudora", message id
1.933284884E+9 of mailbox 4 of application "Eudora"}
I think the loop will proceed in date order, but if not, you'll have
to loop though ALL the messages by removing these lines.
else
exit repeat -- no more old messages
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.