This comes with a "script_message" input command, which sends these messages. Used by the following commits.
This is mostly just moving code around.