Mailsmith
Other Programs
Scripts
Mailsmith.scpt
Archive to sub-mailbox
Check Spelling
Find reply
Change font size
Submit Script to JEM
Fix common spelling errors
Setting SMTP server
URL from Safari
Address from AB
linkMunge
Export to Address Book
Saving attachments
Digest Script
File with same
POP window position
Position of new windows
iCal and Mailsmith
Edit From Line
Modified Thread Script
Reply to Selection
Temporary Text Window
Compact gain
Tracking backups
Edit subject
Googler
Auto-rewrap
MMA
SMTP server
Open, fetch, and close
URL Manager
BrainForest
Thread by Author
Thread by subject
Export Email
Get Selection
Read Addresses
Export Email
Organize Email
Account setup
Mailsmith 2 BBEdit
BBEdit 2 Mailsmith
Search II
Check One
Delete Enclosure
Open, fetch, close
Set Answered
Set Redirected
Empty Trash
List found
Print Several
Del. old. msg.
Delete Enclosures
Accounts
Address Book
Editing
Filters
General
Import/Export
Links
Mailboxes
Memory
Scripting
Speed
send/receive
Tips/Tricks


Digest Script

Author Charlie Garrison
Last modified 2003-01-12
What is this?
This is not mine; I pulled it from list archives recently (and made minor change).

on run
    set the_list to get_list()
    if the_list is not {} then
        my do_action(the_list)
    else
        display dialog "No messages were selected" buttons "Oops"
    end if
end run

on do_action(the_list)
    tell application "Mailsmith"
        set m to 0
        set n to count items of the_list
        set digestList to {}
        repeat with i from 1 to n
            try
                set digest_name to subject of item i of the_list
                set digestList to (a reference to (every part of part 3 of part 1 of item i of the_list))
                --set digestList to every part of part 2 of part 1 of item i of the_list
                make new mail list window with properties {name:digest_name} with data digestList --every part of part 3 of part 1 of item i of the_list
                set seen of item i of the_list to true
            on error errMsg number ErrNum
                set m to m + 1
                if m = n then
                    beep
                    display dialog "No digests were found?" buttons "Ok" default button 1
                end if
            end try
        end repeat
    end tell
end do_action

on get_list()
    tell application "Mailsmith"
        set retry to false
        try
            set m_list to get selection
            set m_list to m_list as list
            set m to item 1 of m_list
            if class of m is not message then set retry to true
        on error
            set retry to true
        end try
        if retry then
            set retry to false
            try
                set m_list to message of window 1 as list
            on error
                set retry to true
            end try
        end if
        if retry then set m_list to {}
    end tell
    return m_list
end get_list