Random Signatures in Multithreaded NewsWatcher

MTNW allows only one signature per personality. This script will allow you to have a random script in each message. However, you have to manually run the script for each message.

Before running the script, create a file containing the sigs you wish to use. Place one sig on a line; multi-line sigs are not supported. Do not leave any blank lines in the file.

The first time you run the script, it will ask you to locate the sig file. (Also after any editing.) After that, if there is an outgoing message window open, there is no other user interface; it chooses a sig and places it in the outgoing message; otherwise, it alerts you that you need to have an outgoing message window open.

I compiled the script as a script file, not an application file, and placed it in ~/library/scripts/applications/MT-NewsWatcher I can then access it from the Applescript menu in the menu bar whenever MTNW is the frontmost application.

property SigFile : missing value
tell application "MT-NewsWatcher"
		set the msg to message window 1
		if the SigFile is missing value then set the SigFile to choose file with prompt "Choose the signatures file."
		set the sig to some paragraph of (read the SigFile)
		set the signature of the msg to the sig
	on error
		display alert "No outgoing message" message "You must have an outgoing message window open." as warning
	end try
end tell