On Tuesday, 30 March 2004, Jakob Riis, [EMAIL PROTECTED],
thoughtfully composed the following:

>OK - I think I will end up doing something like this: Activate a
>'customized' version of Marcus' AppleScript that moves the message to the
>Mail Trash instead of deleting directly, then set the status to read.
>This seems to work fine. Thanks to everybody for the help.

Cool. Actually, you don't need all those repeat loops; try this:

tell application "PowerMail"
        set messageList to current messages
        repeat with MyMessage in messageList
                if attachments of MyMessage exists then
                        set attachList to MyMessage's attachments
                        set xList to {"dat", "dat", "pif"}
                                                                set 
AppleScript's text item delimiters to "."
ignoring case
                                repeat with theAttach in attachList
                                        set itsName to theAttach's name
                                        set xTender to itsName's last text item
                                        if xTender is in xList then move 
MyMessage to the mail trash
                                end repeat
                        end ignoring
                                                        set AppleScript's text 
item delimiters to {""}
end if
        end repeat
end tell

HTH,

Marcus
-- 
Marcus Jarrett, Adelaide, South Australia.

Women who seek to be equal with men lack ambition.

-Timothy Leary


Reply via email to