A friend of mine wanted to export signatures from Mail to a text file. Signatures are kept in a plist file, but are stored in a RTF format that doesn't lend itself to easy exporting.
Using a little bit of AppleScript knowledge, I constructed the following script that exports each signature to a text file:
do shell script "touch ~/Desktop/sigdump.txt"Enter the script using Apple's ScriptEditor, and note that the "write" portion of the script cotains three quoted line breaks (hence the lack of indentation on those lines).
property sigdump : (path to desktop as string) & "sigdump.txt"
set sigdump to sigdump as alias
set theFile to open for access (sigdump) with write permission
set eof theFile to (get eof theFile)
tell application "Mail"
set sigcount to count of signatures
end tell
repeat with i from 1 to sigcount
tell application "Mail"
set signame to name of signature i
set sigcontent to content of signature i
end tell
write "Signature " & i & "
" & signame & "
" & sigcontent & "
" to theFile as string
end repeat
close access (sigdump)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20021103060644193