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


Auto-rewrap

Author Terje Bless
Last modified 2002-03-30
What is this?
This is a script that should be attached to the "Reply to sender" menu command (see the manual for how to do that). It will rewrap the orginal message when you want to reply to it. It comes in two flavours, the first is the basic one that only do the rewrap part the second will also automatically answer subscription confirmations and turn on various options that Terje likes.

on menuselect(menuName, itemName)
  return false
end menuselect

on postmenuselect(menuName, itemName)
  select text 1 of message window 1
  rewrap quoted text selection of message window 1 width 75 ¬
    indentation none with paragraph fill and removing quote spaces
end postmenuselect



Second version

on menuselect(menuName, itemName)
  return false
end menuselect

on postmenuselect(menuName, itemName)
  if menuName = "Message" and itemName = "Reply to Sender" then
    tell application "Mailsmith 1.5"
      set myWin to message window 1
      select text 1 of myWin
      if (subject of myWin contains "-- confirmation of subscription --") then
        delete selection of myWin
        set use signature of myWin to false
        queue myWin
        display dialog "Subscription Confirmation has been Queued for sending."
      else
        set show cursor position of myWin to true
        set show line numbers of myWin to true
        set show tab stops of myWin to true
        set show status bar of myWin to false
        set zoomed of myWin to true
        rewrap quoted text selection of message window 1 width 75 ¬
          indentation none with paragraph fill and removing quote spaces
      end if
    end tell
  end if
end postmenuselect