What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Editing a registry - scripting

Editing a registry - scripting
Author: Message:
Nathan
Veteran Member
*****

Avatar
Yeah, "large dimensions" ;)

Posts: 2984
Reputation: 76
– / Male / Flag
Joined: Apr 2005
O.P. Editing a registry - scripting
Okay,

I'm making a script that edits a registry (or overwrites doesnt matter).
On messagerecieve it will add to the registry a color - to change the keyboard to, and after 1 second it adds a second colour(restore it back to the previous color, so it looks like it flashes :P).

This is what mynetx has come up with, but it doesn't work properly:

jscript code:
// Colour Changer
// Created by mynetx <mynetx@msgpluslive.net>

// global variables

var intColorHighlight = 0xffff6018; // aabbggrr, intense orange
var intColorNormal = 0xfffd2f22; // aabbggrr, smooth red
var objShell; // will hold the Shell ActiveX
var strAlienKey = "HKCU\\Software\\AlienFXAPI\\ColorWheel\\Colors\\Keyboard"; // registry path

// event handlers

function OnEvent_Initialize(boolMessengerStart) {
    objShell = new ActiveXObject('WScript.Shell');
}

function OnEvent_ChatWndReceiveMessage(objWnd, strOrigin, strMessage, intMessageKind) {
    if(strOrigin == Messenger.MyName)
        return;
    objShell.RegWrite(strAlienKey, intColorHighlight, 'REG_DWORD');
    MsgPlus.AddTimer('ResetColor', 1000);
}

function OnEvent_Timer(strTimerId) {
    switch(strTimerId) {
        case 'ResetColor':
            objShell.RegWrite(strAlienKey, intColorNormal, 'REG_DWORD');
    }
}

Thanks for your help :)

This post was edited on 10-27-2008 at 07:40 PM by Nathan.
Touch Innovation - touch friendly programs/applications for the windows mobile!


10-27-2008 07:28 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Editing a registry - scripting - by Nathan on 10-27-2008 at 07:28 PM
RE: Editing a registry - scripting - by matty on 10-27-2008 at 07:33 PM
RE: Editing a registry - scripting - by Nathan on 10-27-2008 at 07:37 PM
RE: Editing a registry - scripting - by Eljay on 10-27-2008 at 07:38 PM
RE: Editing a registry - scripting - by Nathan on 10-27-2008 at 07:39 PM
RE: Editing a registry - scripting - by matty on 10-27-2008 at 07:41 PM
RE: Editing a registry - scripting - by Nathan on 10-27-2008 at 08:45 PM
RE: Editing a registry - scripting - by mynetx on 10-28-2008 at 10:50 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