finally i fixed it with a delay function. messenger freezes during that delay, but i only want it when im away, so it works perfect for me :)
here is the code:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, User, Message, Kind) {
if (botActive[ChatWnd.Handle] == true) {
if (Kind == 1 && User != Messenger.MyName) {
var m = Message.toLowerCase();
writeClipboard(m);
pause(500);
var mbot = readClipboard();
mbot = mbot.toLowerCase();
ChatWnd.SendMessage(mbot);
clearClipboard();
}
}
}
function pause(milisegundos){
var date = new Date();
var curDate = null;
do{
curDate = new Date();
} while (curDate - date < milisegundos);
}