quote:
Originally posted by Mattike
That's why markee was using RegExp's. So, the code which should do it:
code:
var original = new Array("dont","cant","test");//what you are changing from
var changed = new Array("don't","can't","test1");//what you are changing to
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
for(i in original){
Message = Message.replace(RegExp(original[i], "gi"), changed[i]);
}
return Message;
}
Exactly, all I forgot was to re-define Message
* markee writes note to always use the scripting engine now on before posting any code