• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting Eudora
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Eudora


  • Subject: Re: Scripting Eudora
  • From: Richard Jones <email@hidden>
  • Date: Thu, 14 Nov 2002 07:41:27 -0800

On 11/12/02 4:37 PM, "John Delacour" <email@hidden> wrote:

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


Hmmm. In Entourage or OE that whole thing would be

tell application "Microsoft Entourage"
delete every message of folder "Inbox" whose date received >
((current date) - (30 * days))
end tell

No wonder you look for any way to save typing. ;-) I fear that in Eudora, my
monster 100 KB scripts would be more like 500 KB, if I could ever figure out
how to do it.


Thanks to all. One problem I encountered involved the message status. I wanted to file message that I've read, but the script returned intermittent errors stating that it couldn't get the status of the message. It also moved messages that hadn't been read.

Richard Jones
_______________________________________________
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.

  • Prev by Date: Re: A Tragedy of Errors was Re: handler failure
  • Next by Date: Re: Entourage: Kill that Daemon! (Shell)
  • Previous by thread: Re: Scripting Eudora
  • Next by thread: date "Jan" --> date object
  • Index(es):
    • Date
    • Thread