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 » Last »
[request] Flashing Keyboard LED's when message received
Author: Message:
DarkRaider
Junior Member
**

Avatar

Posts: 61
39 / Male / –
Joined: Mar 2005
O.P. [request] Flashing Keyboard LED's when message received
Note: this script has been made and is now available from http://shoutbox.menthix.net/showthread.php?tid=63303.


Is it possible to create a script that makes the Scroll-Lock LED on the keyboard flash?

If somebody can create it, a screen to set the LED's that have to flash might be usefull.. cause i understand it when people say that flashing the Num-Lock and Caps-Lock LED's might be annoying when they are typing something.. ;)

But if i have some code to access them, i might be able to make this script myself :)

This post was edited on 07-15-2006 at 01:43 PM by Tochjo.
06-27-2006 05:44 PM
Profile E-Mail PM Find Quote Report
ivan300
Junior Member
**


Posts: 51
36 / Male / –
Joined: Oct 2003
RE: [request] Flashing Keyboard LED's when message received
here is vb code that will turn the num led on and off

code:
Const VK_num = 144
Const Vk_scroll = 145
Const VK_caps = 20
Const KEYEVENTF_KEYUP = &H2
Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Sub Command1_Click()

    keybd_event VK_num, 0, 0, 0
    keybd_event VK_num, 0, KEYEVENTF_KEYUP, 0
End Sub


I am not sure how to conver "Private Declare Sub keybd_event Lib "user32.dll" ...." to jscript
06-27-2006 06:01 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [request] Flashing Keyboard LED's when message received
quote:
Originally posted by ivan300
Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
code:
Interop.Call('user32', 'keybd_event', VK_num, 0, 0, 0);
Interop.Call('user32', 'keybd_event', VK_num, 0, KEYEVENTF_KEYUP, 0);

I started working on a message notifier when you are running a fullscreen app but I never finished it; I may start it back up again.

This post was edited on 06-27-2006 at 06:04 PM by matty.
06-27-2006 06:03 PM
Profile E-Mail PM Find Quote Report
ivan300
Junior Member
**


Posts: 51
36 / Male / –
Joined: Oct 2003
RE: [request] Flashing Keyboard LED's when message received
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 :)
code:
//WML Flash 1.0 for MPL! ;) by ivan300@yahoo.com

var VK_num = 144
var Vk_scroll = 145
var VK_caps = 20
var KEYEVENTF_KEYUP = '&H2'

function OnEvent_Initialize(bMessengerStart){
//turns off the light when initalised
}

function OnEvent_Uninitialize(bMessengerExit){
}
//when a chat window is created it starts a timer
function OnEvent_ChatWndCreated(){
MsgPlus.AddTimer('check', 100);
}

//when the chat window is closed it stops the timers and turns the light off
function OnEvent_ChatWndDestroyed(){
MsgPlus.CancelTimer('check');
MsgPlus.CancelTimer('check2');

}

//when a message is typed by you the light will turn off
//function OnEvent_ChatWndEditKeyDown(){
//MsgPlus.CancelTimer('check');
//}



//this turns the light off and on depending on the timers
function OnEvent_Timer(sTimerId){
    if(sTimerId == 'check'){
        Interop.Call('user32', 'keybd_event', VK_num, 0, 0, 0);
        Interop.Call('user32', 'keybd_event', VK_num, 0, KEYEVENTF_KEYUP, 0);
        MsgPlus.AddTimer('check2', 200);
    }
    if(sTimerId == 'check2'){
        Interop.Call('user32', 'keybd_event', VK_num, 0, 0, 0);
        Interop.Call('user32', 'keybd_event', VK_num, 0, KEYEVENTF_KEYUP, 0);
        MsgPlus.AddTimer('check', 200);
    }

}

06-27-2006 06:22 PM
Profile E-Mail PM Find Quote Report
Apola Silverstone
Junior Member
**


Posts: 33
33 / Other / –
Joined: Jun 2006
RE: [request] Flashing Keyboard LED's when message received
This sounds like it will be one of my favourite scripts. I hope you can get it finished. Also, if you could set it so i could instead use my scroll lock light, it would be much better i think. thanks, (good luck)
06-27-2006 06:32 PM
Profile E-Mail PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: [request] Flashing Keyboard LED's when message received
This will be a feature of StuffPlug 3. I know that is not a good answer to the question, but you might be interested in it.

Also keep in mind that the method described above will influence the response of the keyboard. It doesn't really flash the lights, but instead it turns num-lock on & off, and that's causing the LED's to flash.

However it can be quite usefull. It's one of my favorite "small but very usefull" SP features(Y)
06-27-2006 06:42 PM
Profile E-Mail PM Find Quote Report
Apola Silverstone
Junior Member
**


Posts: 33
33 / Other / –
Joined: Jun 2006
RE: [request] Flashing Keyboard LED's when message received
>.< thanks you, and do you know how much longer (roughly) it will take for sp3 to be out?
06-27-2006 06:43 PM
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
lets hope it doesn't take too long ;)

but still, i'm trying to make ivan300's script work.. :)

EDIT:
GOT IT !! ;)
i'll post it in a couple of minutes.. and i'll start expanding the script with the ability to configure it ;)


EDIT2:

code:
//WML Flash 1.0 for MPL! ;) by ivan300@yahoo.com
// slightly modified by djcarre@gmail.com

var VK_num = 144
var Vk_scroll = 145
var VK_caps = 20
var KEYEVENTF_KEYUP = '&H2'
var count = 0

function OnEvent_Initialize(bMessengerStart){
    //turns off the light when initalised
}

function OnEvent_Uninitialize(bMessengerExit){

}

//when a chat window is created it starts a timer
function OnEvent_ChatWndCreated(){
    MsgPlus.AddTimer('check', 200);
}

//when the chat window is closed it stops the timers and turns the light off
function OnEvent_ChatWndDestroyed(){
    MsgPlus.CancelTimer('check');
    MsgPlus.CancelTimer('check2');

}

//when a message is typed by you the light will turn off
function OnEvent_ChatWndEditKeyDown(){
    MsgPlus.CancelTimer('check');
}



//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);
        MsgPlus.AddTimer('check2', 200);
        MsgPlus.CancelTimer('check');
    }
    if(sTimerId == 'check2'){
        Debug.Trace('check2')
        Interop.Call('user32', 'keybd_event', Vk_scroll, 0, 0, 0);
        Interop.Call('user32', 'keybd_event', Vk_scroll, 0, 2, 0);
        MsgPlus.AddTimer('check', 200);
        MsgPlus.CancelTimer('check2');
    }
}


This post was edited on 06-27-2006 at 07:54 PM by DarkRaider.
06-27-2006 06:59 PM
Profile E-Mail PM Find Quote Report
djnerve
Junior Member
**

Avatar
!-STE06-!

Posts: 46
35 / Male / –
Joined: Jun 2006
RE: [request] Flashing Keyboard LED's when message received
doesn't work for me:(
06-28-2006 12:21 AM
Profile E-Mail PM Web Find Quote Report
ivan300
Junior Member
**


Posts: 51
36 / Male / –
Joined: Oct 2003
RE: [request] Flashing Keyboard LED's when message received
I got it working

Update 2 Thanks silentdragon i forgot about that :$ hehe
code:
//WML Flash 1.0 for MPL! (Smilie) by ivan300@yahoo.com
// slightly modified by djcarre@gmail.com

var VK_num = 144
var VK_scroll = 145
var VK_caps = 20
var KEYEVENTF_KEYUP = '&H2'
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);
}

//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){
    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);
MsgPlus.AddTimer('check2', 100);
}
if(sTimerId == 'check2'){
Debug.Trace('check2')
Interop.Call('user32', 'keybd_event', VK_scroll, 0, 0, 0);
Interop.Call('user32', 'keybd_event', VK_scroll, 0, 2, 0);
MsgPlus.AddTimer('check', 100);
}
}


This post was edited on 06-28-2006 at 12:56 AM by ivan300.
06-28-2006 12:32 AM
Profile E-Mail PM Find Quote Report
Pages: (10): « First [ 1 ] 2 3 4 5 » 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