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

Pages: (10): « First « 1 2 [ 3 ] 4 5 6 7 » Last »
[request] Flashing Keyboard LED's when message received
Author: Message:
patternott
New Member
*


Posts: 4
Joined: Jun 2006
RE: [request] Flashing Keyboard LED's when message received
Hello, Thanks for this script it works great and i love it.

Just one thing, is it possible to make a key (ie. caps lock) stop the light from flashing. I ask this because i have a Logitech keyboard and when i am in a full-screen game Scroll Lock On - Scroll Lock Off, keeps on flashing on the bottom of the screen and its very annoying and sometimes i cant minimize to stop it.

If this can be done it will be greatly appreciated.

This post was edited on 06-28-2006 at 05:54 AM by patternott.
[Image: patternott.jpg]
06-28-2006 05:54 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [request] Flashing Keyboard LED's when message received
quote:
Originally posted by ivan300
This is what i have so far, It will only trun off the led but it wont turn it on :S
If some one can debug it and release it please be my guest :)
check your declaration of KEYEVENTF_KEYUP:

code:
var KEYEVENTF_KEYUP = '&H2'

A string is something with quotes put around, but
&H2 is not a string it is a hexadecimal number.

To define KEYEVENTF_KEYUP properly as a number:

code:
var KEYEVENTF_KEYUP = 0x02
.-= A 'frrrrrrrituurrr' for Wacky =-.
06-28-2006 06:28 AM
Profile PM Find Quote Report
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
patternott
New Member
*


Posts: 4
Joined: Jun 2006
RE: [request] Flashing Keyboard LED's when message received
Thanks that works great.
[Image: patternott.jpg]
06-28-2006 07:15 AM
Profile E-Mail PM Find Quote Report
John Anderton
Elite Member
*****

Avatar

Posts: 3908
Reputation: 80
37 / Male / Flag
Joined: Nov 2004
Status: Away
RE: [request] Flashing Keyboard LED's when message received
quote:
Originally posted by Silentdragon
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.
Well there are a few bugs that i would like to talk about ... mabbe on wlm? Add me. My address is in my profile :)
[

KarunAB.com
]

[img]http://gamercards.exophase.com/459422.png[
/img]
06-28-2006 07:59 AM
Profile E-Mail PM Web Find Quote Report
MisterFreak
New Member
*

=)

Posts: 4
33 / Male / –
Joined: Jun 2006
RE: [request] Flashing Keyboard LED's when message received
Nice script! But it would be handy if there is an way  to don't let the led flicker when WLM is locked. But I really think it is a nice script!
[Image: mfsigg.jpg]
06-28-2006 08:55 AM
Profile E-Mail PM Web Find Quote Report
Bmw1000c
Junior Member
**

Avatar
yay!

Posts: 45
44 / Male / –
Joined: May 2004
RE: [request] Flashing Keyboard LED's when message received
i love it :D
gratz Silentdragon and ivan300
I'm portuguese!
06-28-2006 09:42 AM
Profile E-Mail PM Find Quote Report
DarkRaider
Junior Member
**

Avatar

Posts: 61
39 / Male / –
Joined: Mar 2005
O.P. RE: [request] Flashing Keyboard LED's when message received
this afternoon (CET) i'm going to make a configure interface so that you can configure which LED's have to flash and which don't.
And when it's ready and working without (much) bugs and everybody is happy about it, we can upload it to the MP!L scripts site ;)

This post was edited on 06-28-2006 at 09:46 AM by DarkRaider.
06-28-2006 09:45 AM
Profile E-Mail PM Find Quote Report
Mentality
Full Member
***

Avatar
The Best Representation OF me IS ME!

Posts: 490
Reputation: 19
38 / Male / Flag
Joined: Jun 2005
RE: [request] Flashing Keyboard LED's when message received
Great script guys and a fine entrance to the forum - welcome on board. I look forward to the final product.

This post was edited on 06-28-2006 at 09:52 AM by Mentality.
06-28-2006 09:52 AM
Profile E-Mail PM Find Quote Report
Dark_Angel_Pt
Junior Member
**

Avatar

Posts: 25
40 / Male / –
Joined: Jun 2006
RE: [request] Flashing Keyboard LED's when message received
Great script guys. But instead of caps lock can't i use some other key? Because in some games caps lock is used and i would prefer to use home, end or pause to stop the lights flashing.

Also when you code the configuration interface can you add a script on/off? Because i only want it to flash when i'm playing or something, not all the time.

This post was edited on 06-28-2006 at 11:23 AM by Dark_Angel_Pt.
If you try and don't succeed, cheat. Repeat until caught. Then lie.
06-28-2006 11:04 AM
Profile E-Mail PM Find Quote Report
Pages: (10): « First « 1 2 [ 3 ] 4 5 6 7 » Last »
« Next Oldest Return to Top Next Newest »


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