Just a small question since i'm trying to get the toast part in my own script, but can't quite get it to work.
code:
var a = new Array();
function OnEvent_Timer(TimerId)
{
for(i in a)
{
if (TimerId == a[i])
{
a[i] = undefined;
break;
}
}
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
//Help text
if( Message.match(/^!help$/i) && Origin != Messenger.MyName )
{
ChatWnd.SendMessage('!help = Show this text.')
ChatWnd.SendMessage('!song = Show the song im listening to. (for my Winamp only)')
ChatWnd.SendMessage('!sendsong = Send you the song im listening to.')
ChatWnd.SendMessage('!roll = Rolls between 1 and 100. I know your a WoW bitch. (-.-)')
ChatWnd.SendMessage('!wakeup = Shows a small message on my screen, handy when im unable to see or ignorre the chat.')
}
//Song name
if( Message.match(/^!song$/i) && Origin != Messenger.MyName )
{
ChatWnd.SendMessage('/np')
}
//Send Song
if( Message.match(/^!sendsong$/i) && Origin != Messenger.MyName )
{
ChatWnd.SendMessage('/sendsong')
}
if( Message.match(/^!songsend$/i) && Origin != Messenger.MyName )
{
ChatWnd.SendMessage('/sendsong')
}
//Roll(1-100)
if( Message.match(/^!roll$/i) && Origin != Messenger.MyName )
{
ChatWnd.SendMessage('/roll')
}
//Wakeup
if( Message.match(/^!wakeup$/i) && Origin != Messenger.MyName )
{
//ChatWnd.SendMessage('Yeye, im waking up and will answer if I saw it. Do not spam, if I am here I will reply. ty')
//MsgPlus.DisplayToast('!wakeup','Some bitch is nugging you..');
var popup = true;
if (Email == a[i]) {
popup = false;
}
if(popup){
var Contact = Messenger.MyContacts.GetContact(Email);
MsgPlus.DisplayToastContact("Toast", Contact.Name, "Has Toasted you!","","onSignInToast_Click", Email);
var eind = a.length + 1;
for(i=0; i < eind; i++) { //> if toast should get blocked or not
if(a[i] == 'undefined') {
a[i] = Email;
break;
}
}
MsgPlus.AddTimer(Email, 10000);
}
}
}
Do you see what I did wrong? ^_^ ty