Re: Script Suddenly Failing
From: Sam L Elowitch (honeypot_at_die.spam.die)
Date: 05/06/04
- Next message: Paul Berkowitz: "Re: Script Suddenly Failing"
- Previous message: Gary Simmons: "Entourage suddenly stopped sending hotmail email"
- In reply to: Paul Berkowitz: "Re: Script Suddenly Failing"
- Next in thread: Paul Berkowitz: "Re: Script Suddenly Failing"
- Reply: Paul Berkowitz: "Re: Script Suddenly Failing"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 06 May 2004 13:10:04 -0400
Thanks for the interesting, detailed, and thought-provoking response, Paul.
As usual, you amaze me. I'll report back what happens.
-Sam
On 5/6/04 11:26 AM, in article BCBFA745.63486%berkowit@spoof_silcom.com,
"Paul Berkowitz" <berkowit@spoof_silcom.com> wrote:
> On 5/6/04 6:04 AM, in article BCBFB027.C9FF%honeypot@die.spam.die, "Sam L
> Elowitch" <honeypot@die.spam.die> wrote:
>
>> I had thought that this script, which I trigger on a schedule, was working
>> fine:
>>
>> tell application "Microsoft Entourage"
>> set theFolder to folder "Personal" of folder "Inbox"
>> set allGroupMembers to (content of every group entry of group
>> "Subscribed Forums")
>> move (every message in theFolder whose sender is in allGroupMembers and
>> read status is read) to folder "Deleted Items"
>> end tell
>>
>> Unfortunately, it seems to only deleted a selected message whose read status
>> is read and which is a member of the group "Subscribed Forums". Odd.
>>
>> I've tried checking and double-checking the display names and e-mail
>> addresses and I'm certain they're correct.
>>
>> What could be wrong with this script?
>
> It works just fine here. You're saying that unless you happen to have that
> "Personal" folder open with a particular message meeting the criteria
> selected (highlighted) in the UI nothing happens when you run the script?
>
> Selection is irrelevant here. There's no mention of selection or 'current
> messages' in the script. 'move' - if it's working at all (i.e. the folder
> must be local, not IMAP or Hotmail) should be working on the whole set of
> messages meeting the criteria. And the 'whose' clause is structured
> correctly (normally 'is in' requires list brackets around {sender} but not
> in a whose clause). So - IF the display names are really EXACTLY the same in
> both email message and contact name/group entry, then it should work. It
> does here.
>
> Personally, I think you should avoid all possibility of the sender using a
> slightly different display name by instead using this version:
>
> tell application "Microsoft Entourage"
> set theFolder to folder "Personal" of folder "Inbox"
> set allGroupMembers to (content of every group entry of group
> "Subscribed Forums")
> delete (every message in theFolder where address of its sender is in
> allGroupMembers and read status is read)
> end tell
>
> This way you just check addresses, not display names, and 'delete' is
> better-behaved than 'move'.
>
> However, I notice that the name of your group is "Subscribed Forums". If
> this includes (or means) mailing lists, you should be aware that messages
> from mailing lists are actually TO the mailing list, not FROM it. The
> mailing list is not the message's sender - the original sender is. So if you
> want to delete mailing list messages you'd have to fit in another criterion.
> In fact you'd couldn't do it by simple whose clause, you'd have to do it by
> repeat loop, checking each item of (address of every recipient) against the
> same list of allGroupMembers or list of (list address of every mailing
> list) if they're registered mailing lists in the MLM, which might be
> quicker.
>
-- Sam Elowitch Entourage v. X (10.1.4)
- Next message: Paul Berkowitz: "Re: Script Suddenly Failing"
- Previous message: Gary Simmons: "Entourage suddenly stopped sending hotmail email"
- In reply to: Paul Berkowitz: "Re: Script Suddenly Failing"
- Next in thread: Paul Berkowitz: "Re: Script Suddenly Failing"
- Reply: Paul Berkowitz: "Re: Script Suddenly Failing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|