(* //Export_Mail_Signatures Script// Created by mark hunte on 19/04/2008. // Copyright 2008 . All rights reserved. ( well you know what I mean) In response to Macosxhints question in http://forums.macosxhints.com/showthread.php?p=464704- This script will match the Signatures found in the "AllSignaturesKey" Array of the SignaturesByAccount.plist, with the webarchives files found in the "/Users/Username/library/Mail/Signatures/" folder. Any Signatures found in the "AllSignaturesKey" Array should only be processed if a webarchives file is found for it. This script will Convert them into New RTF files , And Place them into a folder of your choice, naming them as the Signatures are named in Mail.app. The script use the command line tool Textutil to do the conversion to RTF from webarchive. Textutil can convert to and from other formats you may want. -- formats --( txt, html, rtf, rtfd, doc, docx, wordml, odt, or webarchive ) *) tell application "Finder" (* set format of target conversion *) set format_ to "rtf" (* choose target folder for new files*) set folder_target to (choose folder with prompt "Please select the Folder you want the Converted file in") (* get users Mail signature folder*) tell application "System Events" to set sourcePath to ((path to home folder of user domain) & "library:Mail:Signatures" as Unicode text) as alias tell application "System Events" (* get signature names and unique id from in "AllSignaturesKey" array in the SignaturesByAccount.plist file*) set the SignatureName to (value of property list item "SignatureName" of property list items of property list item "AllSignaturesKey" of contents of property list file (POSIX path of sourcePath & "/SignaturesByAccount.plist")) set the SignatureUniqueId to (value of property list item "SignatureUniqueId" of property list items of property list item "AllSignaturesKey" of contents of property list file (POSIX path of sourcePath & "/SignaturesByAccount.plist")) end tell (* repeat loop for each signature found in the plist file*) repeat with i from 1 to number of items in SignatureUniqueId set this_item to item i of SignatureUniqueId (* check if actual file exists*) set this_item to (items of sourcePath whose displayed name contains this_item) if this_item is not {} then (* if file exists, then get the file *) set this_item to POSIX path of (item 1 of this_item as Unicode text) (* escape any spaces in the SignatureName , the name of the Signature*) set this_Name to (do shell script "echo " & quoted form of item i of SignatureName & "|sed 's/\\ /\\ /g'") (* set up path,name, and extension *) set uniqPath to POSIX path of (folder_target & this_Name & "." & format_ as Unicode text) (* make new file and put it in target folder *) set sig_xml to do shell script "Textutil -convert " & format_ & space & quoted form of this_item & " -output " & quoted form of uniqPath end if end repeat end tell