On Mar 5, 2010, at 7:49 PM, Tom Dillon wrote:

> It's gotten to where I have to replace the corrupted
> SpamSieve - Evaluate.scpt file once or more times a week. It's not that
> big of a problem, but I'm wondering how or why it's getting corrupted?
> Is PM writing to the AppleScript file?


I think the OS may be writing to it because the top-level variables are 
implicitly script properties. I've seen this cause problems with Entourage. Try 
wrapping the whole thing in a handler:

====
on rateCurrentMessages()
  tell application "PowerMail"
    set msgList to current messages
    repeat with msg in msgList
      try
        set src to source of msg
        tell application "SpamSieve" to set externalSpamLevel to (score message 
src)
        if externalSpamLevel > 0 then
          set spam rating of msg to externalSpamLevel
        end if
      end try
    end repeat
  end tell
end rateCurrentMessages

my rateCurrentMessages()
====

and see if that helps.

--Michael

-- 
Michael Tsai
C-Command Software


Reply via email to