powermail-discuss Digest #2901 - Wednesday, November 5, 2008

  AppleScript to move messages to folder matching sender's name?
          by "David M. Marra" <[EMAIL PROTECTED]>
  Re: AppleScript to move messages to folder matching sender's name?
          by "Marlyse Comte" <[EMAIL PROTECTED]>


----------------------------------------------------------------------

Subject: AppleScript to move messages to folder matching sender's name?
From: "David M. Marra" <[EMAIL PROTECTED]>
Date: Tue, 4 Nov 2008 15:46:10 -0500

Hi all,

I use a custom AppleScript to move a message into a specific folder in
my folder list.  For example, let's say my folders are organized like this:

    Dave's Team
        John Doe
        Sally Smith

So, to move a message I am reading to John's folder, I select my "Move
to John" custom AppleScript from my Scripts menu:

------
tell application "PowerMail"
    set messageList to the current messages
    if messageList is {} then display dialog "This script applies to the
selected messages (or it can be used as a mail filter script)" buttons
{"OK"} default button "OK"
    repeat with aMessage in messageList
    move aMessage to message container "John Doe" of message container
"Dave's Team"
    end repeat
    end tell
------

I have a unique script in my Custom Scripts folder, for everybody on my
team.  It's getting quite long and, every time my team changes, I need
to modify my scripts.

What I would love to be able to do is have a single AppleScript that
grabs the sender's name ("John Doe") from my address book and, if a
folder with that same exact name exists in my Folder List, automatically
move it into that folder.  That way, as long as my address book entry
matches a folder name entry for the sender of a message, it will
automatically be moved to their folder, when I activate the script.

Does any happen to have an AppleScript that does this, or something similar?

Thanks!



-Dave




----------------------------------------------------------------------

Subject: Re: AppleScript to move messages to folder matching sender's name?
From: "Marlyse Comte" <[EMAIL PROTECTED]>
Date: Tue, 4 Nov 2008 23:01:00 -0600

why not use PowerMail's simple and elegant filtering option? then you
don't have to manually activate the script but it filters automatically... ?



---marlyse


------------ former message(s) quotes: -------------


>Hi all,
>
>I use a custom AppleScript to move a message into a specific folder in
>my folder list.  For example, let's say my folders are organized like this:
>
>    Dave's Team
>        John Doe
>        Sally Smith
>
>So, to move a message I am reading to John's folder, I select my "Move
>to John" custom AppleScript from my Scripts menu:
>
>------
>tell application "PowerMail"
>    set messageList to the current messages
>    if messageList is {} then display dialog "This script applies to the
>selected messages (or it can be used as a mail filter script)" buttons
>{"OK"} default button "OK"
>    repeat with aMessage in messageList
>    move aMessage to message container "John Doe" of message container
>"Dave's Team"
>    end repeat
>    end tell
>------
>
>I have a unique script in my Custom Scripts folder, for everybody on my
>team.  It's getting quite long and, every time my team changes, I need
>to modify my scripts.
>
>What I would love to be able to do is have a single AppleScript that
>grabs the sender's name ("John Doe") from my address book and, if a
>folder with that same exact name exists in my Folder List, automatically
>move it into that folder.  That way, as long as my address book entry
>matches a folder name entry for the sender of a message, it will
>automatically be moved to their folder, when I activate the script.
>
>Does any happen to have an AppleScript that does this, or something similar?
>
>Thanks!
>
>
>
>-Dave
>
>
>
>



----------------------------------------------------------------------
End of powermail-discuss Digest

Reply via email to