I'm quite sure ragtek developed a multi-mod add-on that does exactly that where an action (close thread for example) will get a automated pre-defined text which would do what your wanting. I'm also quite sure all his mods are now hosted at github or whatever it's called.