root/lang/applescript/misc/read2trash.applescript @ 62

Revision 62, 0.6 kB (checked in by otsune, 9 years ago)

opps... move to misc directory because tinytool

2Read to Trash
4This is a script moving an marked read messages to a trash box in
5This is usable as a rule action.
7author: Masafumi Otsune
10using terms from application "Mail"
11        on perform mail action with messages theMessages for rule theRule
12                tell application "Mail"
13                        set max_value to number of items in theMessages
14                        repeat with i from 1 to max_value
15                                set this_item to item i of theMessages
16                                if (read status of this_item) then
17                                        delete this_item
18                                end if
19                        end repeat
20                end tell
21        end perform mail action with messages
22end using terms from
Note: See TracBrowser for help on using the browser.