What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [request] Flashing Keyboard LED's when message received

[request] Flashing Keyboard LED's when message received
Author: Message:
Silentdragon
Full Member
***

Avatar
if(life==null && wrists) EmoAlert();

Posts: 148
Reputation: 2
34 / Male / –
Joined: Jun 2006
RE: [request] Flashing Keyboard LED's when message received
code:
//WML Flash 1.0 for MPL! (Smilie) by ivan300@yahoo.com
// slightly modified by djcarre@gmail.com

var selectiveBlink = 0
var VK_num = 144
var VK_scroll = 145
var VK_caps = 20
var KEYEVENTF_KEYUP = 0x02
var count = 0

function OnEvent_Initialize(bMessengerStart){
}

function OnEvent_Uninitialize(bMessengerExit){
}

//when a chat window is created it starts a timer
function OnEvent_ChatWndCreated(){
    MsgPlus.AddTimer('check', 200);
}
function OnEvent_ChatWndReceiveMessage(Wnd, Origin,Message,MessageKind){
    if(selectiveBlink == 1) {
        var contacts = new Enumerator(Wnd.Contacts);
        for (; !contacts.atEnd(); contacts.moveNext())
        {
            var contact = contacts.item();
            switch(contact){
                case 'someemail@hotmail.com' :
                case 'someemail2@hotmail.com' :
                    MsgPlus.AddTimer('check',200);
                    count++;
                    break;
            }
            if(count) break;
        }
        count = 0;
    } else
        if(Origin != Messenger.MyName)
            MsgPlus.AddTimer('check',200);
    return Message;
}
//when the chat window is closed it stops the timers and turns the light off
function OnEvent_ChatWndDestroyed(){
    MsgPlus.CancelTimer('check');
    MsgPlus.CancelTimer('check2');
}

//stops the blining when you type into the convo
//make sure to change VK_scroll accordingly if youre using a different led
function OnEvent_ChatWndEditKeyDown(Wnd, key){
    if(key != VK_scroll && key != VK_caps){
        MsgPlus.CancelTimer('check');
        MsgPlus.CancelTimer('check2');
    }
}

//to change which light you want to blink change the
// Vk_scroll to VK_num for num lock or VK_caps for caps lock

//this turns the light off and on depending on the timers
function OnEvent_Timer(sTimerId){
    if(sTimerId == 'check'){
        //Debug.Trace('check');
        Interop.Call('user32', 'keybd_event', VK_scroll, 0, 0, 0);
        Interop.Call('user32', 'keybd_event', VK_scroll, 0, 2, 0);
        if(!Interop.Call('user32',    'GetKeyState', VK_caps))
            MsgPlus.AddTimer('check2', 100);
        else {
            Interop.Call('user32', 'keybd_event', VK_caps, 0, KEYEVENTF_KEYUP, 0);
            Interop.Call('user32', 'keybd_event', VK_caps, 0, 0, 0);
        }
    }
    if(sTimerId == 'check2'){
        //Debug.Trace('check2')
        Interop.Call('user32', 'keybd_event', VK_scroll, 0, 0, 0);
        Interop.Call('user32', 'keybd_event', VK_scroll, 0, KEYEVENTF_KEYUP, 0);
        if(!Interop.Call('user32',    'GetKeyState', VK_caps))
            MsgPlus.AddTimer('check', 100);
        else {
            Interop.Call('user32', 'keybd_event', VK_caps, 0, KEYEVENTF_KEYUP, 0);
            Interop.Call('user32', 'keybd_event', VK_caps, 0, 0, 0);
        }
    }
}

Set at the top if you want to have enable selectiving blinking. Set the emails if needed. If Caps Lock is on the script will only blink the scroll once, otherwise it will blink till you press Caps Lock, and it auto disables caps lock after its pressed.
06-28-2006 07:02 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[request] Flashing Keyboard LED's when message received - by DarkRaider on 06-27-2006 at 05:44 PM
RE: [request] Flashing Keyboard LED's when message received - by ivan300 on 06-27-2006 at 06:01 PM
RE: [request] Flashing Keyboard LED's when message received - by matty on 06-27-2006 at 06:03 PM
RE: [request] Flashing Keyboard LED's when message received - by ivan300 on 06-27-2006 at 06:22 PM
RE: [request] Flashing Keyboard LED's when message received - by Apola Silverstone on 06-27-2006 at 06:32 PM
RE: [request] Flashing Keyboard LED's when message received - by J-Thread on 06-27-2006 at 06:42 PM
RE: [request] Flashing Keyboard LED's when message received - by Apola Silverstone on 06-27-2006 at 06:43 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-27-2006 at 06:59 PM
RE: [request] Flashing Keyboard LED's when message received - by djnerve on 06-28-2006 at 12:21 AM
RE: [request] Flashing Keyboard LED's when message received - by ivan300 on 06-28-2006 at 12:32 AM
RE: [request] Flashing Keyboard LED's when message received - by Silentdragon on 06-28-2006 at 12:49 AM
RE: [request] Flashing Keyboard LED's when message received - by novolo on 06-28-2006 at 02:08 AM
RE: [request] Flashing Keyboard LED's when message received - by Apola Silverstone on 06-28-2006 at 02:15 AM
RE: [request] Flashing Keyboard LED's when message received - by novolo on 06-28-2006 at 02:19 AM
RE: [request] Flashing Keyboard LED's when message received - by Apola Silverstone on 06-28-2006 at 02:21 AM
RE: [request] Flashing Keyboard LED's when message received - by novolo on 06-28-2006 at 02:33 AM
RE: [request] Flashing Keyboard LED's when message received - by Silentdragon on 06-28-2006 at 02:37 AM
RE: [request] Flashing Keyboard LED's when message received - by Apola Silverstone on 06-28-2006 at 02:38 AM
RE: [request] Flashing Keyboard LED's when message received - by novolo on 06-28-2006 at 02:59 AM
RE: [request] Flashing Keyboard LED's when message received - by Silentdragon on 06-28-2006 at 03:14 AM
RE: [request] Flashing Keyboard LED's when message received - by patternott on 06-28-2006 at 05:54 AM
RE: [request] Flashing Keyboard LED's when message received - by CookieRevised on 06-28-2006 at 06:28 AM
RE: [request] Flashing Keyboard LED's when message received - by Silentdragon on 06-28-2006 at 07:02 AM
RE: [request] Flashing Keyboard LED's when message received - by patternott on 06-28-2006 at 07:15 AM
RE: [request] Flashing Keyboard LED's when message received - by John Anderton on 06-28-2006 at 07:59 AM
RE: [request] Flashing Keyboard LED's when message received - by MisterFreak on 06-28-2006 at 08:55 AM
RE: [request] Flashing Keyboard LED's when message received - by Bmw1000c on 06-28-2006 at 09:42 AM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-28-2006 at 09:45 AM
RE: [request] Flashing Keyboard LED's when message received - by Mentality on 06-28-2006 at 09:52 AM
RE: [request] Flashing Keyboard LED's when message received - by Dark_Angel_Pt on 06-28-2006 at 11:04 AM
RE: [request] Flashing Keyboard LED's when message received - by Rik on 06-28-2006 at 11:23 AM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-28-2006 at 11:32 AM
RE: RE: [request] Flashing Keyboard LED's when message received - by Dark_Angel_Pt on 06-28-2006 at 11:38 AM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-28-2006 at 11:46 AM
RE: [request] Flashing Keyboard LED's when message received - by novolo on 06-28-2006 at 12:32 PM
RE: [request] Flashing Keyboard LED's when message received - by orido on 06-28-2006 at 01:18 PM
RE: [request] Flashing Keyboard LED's when message received - by MGrove03 on 06-28-2006 at 02:44 PM
RE: RE: [request] Flashing Keyboard LED's when message received - by djnerve on 06-28-2006 at 02:56 PM
RE: [request] Flashing Keyboard LED's when message received - by novolo on 06-28-2006 at 02:48 PM
RE: [request] Flashing Keyboard LED's when message received - by upsfeup on 06-28-2006 at 04:35 PM
RE: [request] Flashing Keyboard LED's when message received - by MGrove03 on 06-28-2006 at 04:50 PM
RE: [request] Flashing Keyboard LED's when message received - by Silentdragon on 06-28-2006 at 07:49 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-28-2006 at 08:39 PM
RE: [request] Flashing Keyboard LED's when message received - by Dark_Angel_Pt on 06-28-2006 at 08:46 PM
RE: [request] Flashing Keyboard LED's when message received - by Bmw1000c on 06-28-2006 at 08:46 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-28-2006 at 08:48 PM
RE: RE: [request] Flashing Keyboard LED's when message received - by Dark_Angel_Pt on 06-28-2006 at 08:51 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-28-2006 at 08:54 PM
RE: RE: [request] Flashing Keyboard LED's when message received - by Dark_Angel_Pt on 06-28-2006 at 09:09 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-28-2006 at 09:13 PM
RE: [request] Flashing Keyboard LED's when message received - by Dark_Angel_Pt on 06-28-2006 at 09:34 PM
RE: [request] Flashing Keyboard LED's when message received - by ramik on 06-29-2006 at 07:13 AM
RE: [request] Flashing Keyboard LED's when message received - by CookieRevised on 06-29-2006 at 08:57 AM
RE: [request] Flashing Keyboard LED's when message received - by orido on 06-29-2006 at 09:26 AM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-29-2006 at 09:34 AM
RE: [request] Flashing Keyboard LED's when message received - by Dark_Angel_Pt on 06-29-2006 at 11:08 AM
RE: [request] Flashing Keyboard LED's when message received - by CookieRevised on 06-29-2006 at 11:22 AM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-29-2006 at 11:38 AM
RE: [request] Flashing Keyboard LED's when message received - by RudeYute on 06-29-2006 at 12:09 PM
RE: [request] Flashing Keyboard LED's when message received - by lesbass on 06-29-2006 at 12:10 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-29-2006 at 12:10 PM
RE: [request] Flashing Keyboard LED's when message received - by RudeYute on 06-29-2006 at 12:21 PM
RE: [request] Flashing Keyboard LED's when message received - by novolo on 06-29-2006 at 12:39 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-29-2006 at 01:15 PM
RE: [request] Flashing Keyboard LED's when message received - by novolo on 06-29-2006 at 01:23 PM
RE: [request] Flashing Keyboard LED's when message received - by lesbass on 06-29-2006 at 01:42 PM
RE: [request] Flashing Keyboard LED's when message received - by novolo on 06-29-2006 at 01:47 PM
RE: [request] Flashing Keyboard LED's when message received - by lesbass on 06-29-2006 at 01:54 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-29-2006 at 01:56 PM
RE: [request] Flashing Keyboard LED's when message received - by benrolfe on 06-29-2006 at 03:38 PM
RE: RE: [request] Flashing Keyboard LED's when message received - by Dark_Angel_Pt on 06-29-2006 at 03:45 PM
RE: [request] Flashing Keyboard LED's when message received - by Silentdragon on 06-29-2006 at 04:47 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-29-2006 at 05:13 PM
RE: [request] Flashing Keyboard LED's when message received - by RudeYute on 06-29-2006 at 05:30 PM
RE: [request] Flashing Keyboard LED's when message received - by novolo on 06-29-2006 at 06:06 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-29-2006 at 07:14 PM
RE: [request] Flashing Keyboard LED's when message received - by lesbass on 06-29-2006 at 07:46 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-29-2006 at 07:57 PM
RE: [request] Flashing Keyboard LED's when message received - by lesbass on 06-29-2006 at 08:14 PM
RE: [request] Flashing Keyboard LED's when message received - by Knucks on 06-29-2006 at 08:27 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-29-2006 at 08:37 PM
RE: [request] Flashing Keyboard LED's when message received - by Knucks on 06-29-2006 at 08:46 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-29-2006 at 09:02 PM
RE: [request] Flashing Keyboard LED's when message received - by orido on 06-30-2006 at 08:40 AM
RE: [request] Flashing Keyboard LED's when message received - by John Anderton on 06-30-2006 at 09:03 AM
RE: RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-30-2006 at 09:08 AM
RE: [request] Flashing Keyboard LED's when message received - by alexp2_ad on 06-30-2006 at 10:12 AM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-30-2006 at 11:43 AM
RE: [request] Flashing Keyboard LED's when message received - by RudeYute on 06-30-2006 at 02:30 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 06-30-2006 at 03:09 PM
RE: [request] Flashing Keyboard LED's when message received - by RudeYute on 07-02-2006 at 11:10 AM
RE: [request] Flashing Keyboard LED's when message received - by LilBenji on 07-03-2006 at 11:06 PM
RE: RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 07-04-2006 at 12:29 PM
RE: RE: RE: [request] Flashing Keyboard LED's when message received - by RudeYute on 07-05-2006 at 10:57 PM
RE: [request] Flashing Keyboard LED's when message received - by DarkFox on 07-05-2006 at 09:59 PM
RE: [request] Flashing Keyboard LED's when message received - by P4R4D0x on 07-15-2006 at 12:52 AM
RE: [request] Flashing Keyboard LED's when message received - by DarkRaider on 07-15-2006 at 10:12 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On