On 4/17/04 5:04 PM, "Scott Haneda" <[EMAIL PROTECTED]> wrote:
> Perhaps I can take another approach, I have a script now that does all that
> I want other than deleting the fwd: from the sent items folder. It seems to
> me
>
> repeat until (ID of every message of sent mail folder) contains {fwdID} is
> a rather intense thing to ask, there being 1000's of items in that folder,
> it may not be locking up, just taking way too long.
>
> Is there some way I can add to this script to delete any message from the
> sent items folder any message where the to: is [EMAIL PROTECTED]
!!!!!!!! That's at least a hundred times more intense! The only way
AppleScript can find _any_ property of a message in a folder is to search
the whole folder. Looking through every recipient for the email address - in
a repeat loop - is going to be much slower than just finding the ID.
Frankly it would be quicker just to look in the Outbox and make sure it's
_not_ there (meaning it's been sent already if you use my 'send later'. In
fact you just have to wait until the Outbox is empty. I'm not convinced that
the problem is searching the sent items folder - it's often the slowness of
connecting to the server and sending the message. Until the script finishes,
Entourage is going to be "locked up" - that's what script do running from
the script menu. Everyone who uses SpamSieve, for example, knows that. Did
you try saving the me script as an Application? As I told you, that won't
lock Entourage up at all - but it also can't run from a rule or schedule.
Anyway, this might be faster:
tell application "Microsoft Entourage"
set msgList to current messages
set deleteList to {}
repeat with oneMsg in msgList
move oneMsg to folder "!!!SPAM!!!"
set theFwd to forward oneMsg to "[EMAIL PROTECTED]"
without opening window -- so theFwd is a message, not a window
set end of deleteList to theFwd
send theFwd with sending later
end repeat
send -- sends all messages in out box , just once
repeat until (every message of out box folder = {})
end repeat
delete deleteList -- deletes all forwards
end tell
It will still "lock up" until all messages are sent, but it doesn't have to
search for the messages or their IDs so it may be faster.
> Perhaps I could create a schedule to do this as well, though the scheduling
> options do not seem to offer search options.
Why a schedule? To do in the middle of the night? Yes, you can set the
schedule to Run AppleScript to run this script (as a compiled script, not
application). But how are you going to select the messages for it send if
you do that? You might go to bed with some other message(s) selected in a
different folder and forget all about this.
--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: <http://www.entourage.mvps.org/toc.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>
PLEASE always state which version of Entourage you are using - 2001 or X.
It's often impossible to answer your questions otherwise.
--
To unsubscribe:
<mailto:[EMAIL PROTECTED]>
archives:
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>