Re: repeat loops on Eudora messages
Re: repeat loops on Eudora messages
- Subject: Re: repeat loops on Eudora messages
- From: Rob Jorgensen <email@hidden>
- Date: Fri, 31 Oct 2003 16:53:19 -0500
At 5:49 PM +0000 10/31/03, Charles Arthur wrote:
On Fri, 31 Oct 2003 12:04:34 -0500, Rob Jorgensen <email@hidden> wrote:
JD's method is the only way that I know of to work with selected
messages. This will allow you to loop through a mailbox (selected
messages have no impact on this).
tell application "Eudora"
tell mailbox "In" of mail folder ""
set count_ to number of messages
repeat with i from 1 to count_
-- do something to/with message i
end repeat
end tell
end tell
Just a small point, but if that "do something to/with message i" includes
moving it to another mailbox, then you'd be better doing the repeat loop as
repeat with i from count_ to 1 by -1
so that you don't finargle up the count of messages in the mailbox, as it
won't be checking the number once you're in the repeat loop there.
I concur, and I'm surprised that I haven't been bitten by this.
Thanks, Charles.
-- Rob
_______________________________________________
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.