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
|
Modified Thread Script |
| Author |
Erik Mueller-Harder
|
| Last modified |
2003-01-01
|
|
What is this?
I always read mailing list e-mail by thread using an applescript I modified when Mailsmith 1.5 came out, which included a "thread title" property for the message. I've included the script below. It works far more quickly than others I've used that involve stripping prefixes from the subject.
|
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)
set s_list to {}
repeat with i from 1 to count items of the_list
set m to item i of the_list
-- begin script
tell application "Mailsmith 1.5"
set c to container of m
set s to thread title of m
if s_list does not contain s then
set s_list to s_list & {s}
set n to "Thread: " & s as text
make new mail list window with data every message of c whose subject contains s with properties {name:n}
end if
end tell
-- end script
end repeat
end do_action
on get_list()
tell application "Mailsmith 1.5"
set retry to false
try
set m_list to get selection 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
|