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
|
Delete Enclosures |
| Author |
Jan Erik Moström
|
| Last modified |
1998-11-02
|
|
What is this?
This script deletes the enclosures of the messages you have selected.
This action is not reversible and the does a minimum of error checking.
Note: You don't need this script to delete an enclosure since it's possible to do it manually. Look at the script as an scripting exercise.
|
tell application "Mailsmith 1.1"
set addr to {}
set the_class to class of window 1
if the_class is message window then
set msg_list to {msg to message of window 1}
else -- try with the assumption a list of messages is selected
set msg_list to selection as list
if class of item 1 of msg_list is not message then
display dialog "This script works on selected messages!" buttons {"Oops!"} default button 1
end if
end if
repeat with i from 1 to count items of msg_list
if enclosure of item i of msg_list then
delete enclosures of item i of msg_list
end if
end repeat
end tell
|