I must say this script is great, but I have one problem with this script. As script developer, I have to test my script commands time and time again to make sure it works well, so I use CTRL+UP a lot to repeat a command. However, because the script adds a prefix in front of it, it doesn't get parsed. Therefore, I had to modify your script.
So, what you should do in your OnEvent_ChatWndSendMessage is:
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if(Waiting) {
//If there are 2 slashes preceding the message (so it's an escaped command)...
if(Message.substr(0,2) == "//") {
//If the prefix contains some useful characters, return with one slash
if(Prefix.length > 0) return Prefix + Message.substr(1) + Suffix;
//Else, return with 2 slashes so it gets escaped by Plus!
else return Message + Suffix;
//Or, if the message is preceded by one slash (so it's a command), return it
} else if(Message.charAt(0) == "/") return Message;
//If there is no slash in front, add the prefix and suffix anyway
else return Prefix + Message + Suffix;
}
}
Tested and using!