Mail.app Trivia: Where does AppleScript run best?
Last month, I posted a link to some free software for Mail.app OS X that Jonathan Nathan is offering under the GPL. This code was designed to allow a user of Mail.app to move a message to a folder with a single keystroke.
Since then, there's been some progress in the Mail.app app, but not as much as one would think. Apple has released Panther, and Aaron has released a script that does the same thing within Panther.
Both Jonathan's and Aaron's nicely move a message to a folder. Aaron's is built to enable the binding of a keystroke to an AppleScript directly. But both have a common weakness: After a message is moved, the system forgets which message it has last selected.
Weird, because, e.g., this very simple script within Microsoft's Entourage does the same thing, but without forgetting the last message selected:
--Open this script in a new Script Editor window.
tell application "Microsoft Entourage"
set curMsgs to current messages
repeat with theMsg in curMsgs
move theMsg to folder " friends" in folder "Archive"
end repeat
end tell
