quote:
Originally posted by Mattike
var Active = false;
//This will toggle the script when you press F6 (keycode 0x75) in a chat window
function OnEvent_ChatWndEditKeydown(ChatWnd, KeyCode, CtrlKeyDown, ShiftKeyDown) {
if(KeyCode == 0x75 && !CtrlKeyDown && !ShiftKeyDown) {
Active = !Active;
}
}
//This will add '/all' in front of a message when the script is active and the message is not a command
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
if(Active && !/^\/[^\/\s\n\t]+([\/\s\n\t]|$)/.test(Message)) return "/all "+Message;
}
Sorry but that code doesn't work
i press f6, then type a message, then it doesn't send oall chat winodws