For many years, I had a script that set my .signature file and then set a signature in Mail to the contents of that file. It worked perfectly until 10.12 when Apple broke the AppleScript command that let me set the signature. I have found posts on how to SELECT a signature with KBM, but not on how to import from a file. I don’t care if that Signature in Mail gets set or not, as long as I can read and append my .signature to the email I am writing. It would be great if it was smart enough to REPLACE a signature that was already there, but that’s def not needed.
I am wondering if I can do that same thing with keyboard maestro somehow?
For reference, this is the script I ran for many versions of OS X:
#!/bin/bash SIGHOME="$HOME/.signature" $HOME/bin/fortune $HOME/mysigs > $SIGHOME MAIL=`ps -U"$USER" -co command | grep "\bMail\b"` if [ "$MAIL" ]; then cat $SIGHOME | sed -e 's/"/\\"/g' > $HOME/.mail_signature MYSIG="$(<$HOME/.mail_signature)" osascript <<EOF tell application "Mail" to set content of signature "Fortune" to "-- " & return & "$MYSIG" EOF fi exit 0