When I access the satimage.osax scripting addition (which I'm using for its regex capability) from a Mail rule on Snow Leopard, I get errors, but it runs fine in Script Editor. The code below illustrates the problem. The first line executes fine, but the line inside the tell
block throws an error (below), from the mail rule version, which I had catching the error.
set substr to find text "a" in "abcd"
tell application "Mail"
set substr to find text "a" in "abcd"
end tell
So I tried a workaround: tell application "Finder" to ...
from within the Mail Rule script, but that then threw a security error.
It's not a sandboxing problem - it's a 32/64 bit problem. Mail is a 64-bit application in Snow Leopard, and as of right now, Satimage.osax is a 32-bit addition. So for the time being, I set Mail to Open in 32-bit mode (see picture). I arrived at this conclusion after reading a MacScripter forum post. I'd still love to hear another workaround, in case Satimage stays a 32-bit addition.