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
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Editing a registry - scripting
Are you sure that the keyboard will change just when a key is edited? You would think that a message has to be broadcasted for it to be successful.

Where is this keyboard API documented?

Also the colours are the same...
jscript code:
var intColorHighlight = 0xffff6018; // aabbggrr, intense orange
var intColorNormal = 0xffff6018; // aabbggrr, smooth red

This post was edited on 10-27-2008 at 07:38 PM by matty.
10-27-2008 07:33 PM
Profile E-Mail PM Find Quote Report
Nathan
Veteran Member
*****

Avatar
Yeah, "large dimensions" ;)

Posts: 2984
Reputation: 76
– / Male / Flag
Joined: Apr 2005
O.P. RE: Editing a registry - scripting
The keyboard does, there's a 3rd party program that allows more customization and registry monitoring. So any registry edits will instantly change the keyboard. It works, tried and tested - because if I manually edit the registry it will instantly change :)
Touch Innovation - touch friendly programs/applications for the windows mobile!


10-27-2008 07:37 PM
Profile E-Mail PM Web Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: Editing a registry - scripting
Well the two colours in that code are the same :P
10-27-2008 07:38 PM
Profile PM Find Quote Report
Nathan
Veteran Member
*****

Avatar
Yeah, "large dimensions" ;)

Posts: 2984
Reputation: 76
– / Male / Flag
Joined: Apr 2005
O.P. RE: Editing a registry - scripting
Yeah, typo :p. Either way it doesn't work.
Touch Innovation - touch friendly programs/applications for the windows mobile!


10-27-2008 07:39 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Editing a registry - scripting
Does it change the colour at all or not at all?
10-27-2008 07:41 PM
Profile E-Mail PM Find Quote Report
Nathan
Veteran Member
*****

Avatar
Yeah, "large dimensions" ;)

Posts: 2984
Reputation: 76
– / Male / Flag
Joined: Apr 2005
O.P. RE: Editing a registry - scripting
Question, Can anyone adapt this script to keep flashing the keyboard untill the convo is focused?

Thanks :)

BTW: I got it fixed :)

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


10-27-2008 08:45 PM
Profile E-Mail PM Web Find Quote Report
mynetx
Skinning Contest Winner
*****

Avatar
Microsoft insider

Posts: 1175
Reputation: 33
37 / Male / Flag
Joined: Jul 2007
RE: Editing a registry - scripting
So what was the problem? Mind posting the updated code?
mynetx - Microsoft, enhanced.

You have a problem or issue with Windows, Internet
Explorer or Office?
Send a tweet!
10-28-2008 10:50 AM
Profile E-Mail PM Web Find Quote Report
« 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