On Sun, Jan 04, 2004, the following words from Tom Dillon
[EMAIL PROTECTED], emerged from a plethora of SPAM ...

>Jérôme sez:
>
>>The same AppleScript property "current messages" is used for the selected
>>messages (when the script is called manually) and for the filtered
>>message (when the script is called from a filter). In this case, it is a
>>list containing a single message.
>
>It works as you said, except I get an error. Class='DB ', what=7, when=9,
>err=0. I guess immediately deleting a message causes a problem in the
>loop or something. Also, the database needs repair before PM will launch
>again.
>
>>>Is there a way in an AppleScript to keep PowerMail from proceeding to the
>>>next filter?
>>
>>No. Workaround: you can set the subject of your message to "###delete###"
>>in your script, then create a second filter that will delete the message
>>immediately if the subject is "###delete###", and check the "stop
>>applying filters" in the second filter.
>
>Good idea, thanks. But, executing the Delete Immediately AppleScript
>still causes the error. Maybe if I could execute an AppleScript after the
>connection to delete everything in a folder or with a particular subject,
>like "#Delete#"?
>
>Thanks to everyone for the help.

Well, the problem might be that the "Delete Message Immediately"
AppleScript doesn't work as the name implies. This script will display a
dialog asking for confirmation before it deletes. IMO, this isn't what I
imagine when I think "immediate" so I created an AppleScript that deletes
messages without preamble.

Here is an example script if you want to try it.

tell application "PowerMail"
  set the targetList to the current messages
  repeat with targetMsg in the targetList
    delete the targetMsg
  end repeat
end tell

HTH

cheshirekat

--
Sometimes even to live is an act of courage.
- Lucius Annaeus Seneca, writer and philosopher

* 867 PowerBook G4 * OS X 10.2.6 * 768 MB Ram *


Reply via email to