Title: Re: Script To Delete & Close Message Windows
I inserted your lines in the script, with the same result as before inserting your lines in the script — and with the delay you predicted — unless I run the script on the most recent message in a list, and then an error results: Can’t get message 1 of folder id 1 whose time sent of it > time sent of item 1 of {incoming message id 10407 of application “Microsoft Entourage”}.

The pause is annoying; instead, I’ll continue to poke at the north key after the script completes. Thanks, Allen and Paul, for the replies.

--
Christopher Robbins
...Upon that snow, out in that crystal land!

From: Paul Berkowitz <[EMAIL PROTECTED]>
Reply-To: "Entourage:mac Talk" <[EMAIL PROTECTED]>
Date: Wed, 10 Jul 2002 14:55:36 -0700
To: Entourage Mac Talk <[EMAIL PROTECTED]>
Subject: Re: Script To Delete & Close Message Windows


On 7/10/02 2:08 PM, "Allen Watson" <[EMAIL PROTECTED]> wrote:

On or near 7/10/02 1:56 PM, Christopher Robbins at [EMAIL PROTECTED] observed:

My mail list windows are sorted by date modified descending. When I run this script, I would like the subsequently selected message (after the deletion occurs) to be the message above the one I deleted (the next most recent), but it’s the message below the one I deleted (the next oldest) that becomes selected. (By comparison, if I click on the Trash icon or Message->Move to->Deleted Items, the message above the one I Trash/Move becomes selected.) Sorry to be so long-winded, but how can I get what I want when I use this script? Thanks.

So far as I know there is no way to control that from the script.

    Try this before you do the deletion

     set theFolder to storage of theMsg   
    --next lines only in Entourage X
    set mailWindow to first browser window whose displayed area is mail area and displayed feature is theFolder   
    select mailWindow
    
    set nextMsg to first message of theFolder whose time sent > (time sent of theMsg)
    -- lines for closing and deleting here
    set selection to {nextMsg}

You can close and delete the message before the final line.

But if your folder is large it will take forever and Entourage will be paralyzed in the interim. Not worth it.

--
Paul Berkowitz


Reply via email to