Moving selected messages from one entourage folder to another
Moving selected messages from one entourage folder to another
- Subject: Moving selected messages from one entourage folder to another
- From: Susan Mackay <email@hidden>
- Date: Tue, 23 May 2006 14:43:25 +1000
- Thread-topic: Moving selected messages from one entourage folder to another
(NB: Posted originally on the Applescript-Implimentors list and reposed here
at the suggestion of that lists moderator)
I want to scan through all of the messages in one Entourage folder and mode
selected ones to another folder.
My code goes like this:
tell application "Microsoft Entourage"
repeat with ThisMessage in messages of folder "Inbox"
set SenderName to display name of sender of ThisMessage
if <<condition>> then
set storage of ThisMessage to folder "Processed Emails"
end if
end repeat
end tell
This works well, except that it skips messages. Looking at the event log,
the translation of the 'repeat" is into a series of "get xxx of item n of
every message of folder "inbox" where n is a sequence number from 1 to the
original number of messages in the folder.
However, as the messages are moved the the new folder, the indexing of the
remaining messages will change.
I've tried several 'tricks' such as getting the message count and attempting
to index the messages in reverse order etc, but I still end up with missed
messages.
What is the "official" way of doing this (I'm very much in "learning mode"
with all of this Applescript and entourage stuff - and Mac's in general - as
I've had my MacBook Pro for about 2 weeks).
I can run the script enough times to have the desired effect , but this is
not 'good style'!
Thanks for the help
Susan
_______________________________________________
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