What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Registry Editing in scripts.

Pages: (2): « First « 1 [ 2 ] Last »
Registry Editing in scripts.
Author: Message:
The_Joker
Full Member
***

Avatar
TF

Posts: 125
Joined: Oct 2005
RE: Registry Editing in scripts.
This script is completely different from the one mentioned here.
Dunno if ur script work, as I said before I can't check it now.
I prefer something simple and easy...
Ne1 know how to fix the ReadRegistry function?
Messenger Plus! 3.61 unofficial Hebrew translator
Messenger Plus! Live unofficial Hebrew translator
06-27-2006 03:19 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Registry Editing in scripts.
quote:
Originally posted by The_Joker
This script is completely different from the one mentioned here.
Dunno if ur script work, as I said before I can't check it now.
I prefer something simple and easy...
Ne1 know how to fix the ReadRegistry function?
How is my script different? You are trying to use an ActiveXObject to read the registry. I am using the Windows API to read the registry. I don't see how this is different at all in any way, aside from mione providing more control; longer code; and using more memory.

code:
var sReturnValue = GetStringValue(HKEY_CURRENT_USER, 'Software\\Patchou\\Messenger Plus! Live', 'DefaultUser');
Debug.Trace('sReturnValue: '+sReturnValue);

Again I don't see how they differ at all.

This post was edited on 06-27-2006 at 03:26 PM by matty.
06-27-2006 03:25 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Registry Editing in scripts.
quote:
Originally posted by The_Joker
Ne1 know how to fix the ReadRegistry function?
already answered

CookieRevised's reply to Registry Editing in scripts.

quote:
Originally posted by CookieRevised
The proper syntax for a "return" statement is:
    return <variable>;

and "value = Shell.RegRead(MsgPlus.ScriptRegPath + key)" is not a value but a statement on its own. So either you do:

    var value = Shell.RegRead(MsgPlus.ScriptRegPath + key);
    return value;

or simply:

    return Shell.RegRead(MsgPlus.ScriptRegPath + key);


This post was edited on 06-28-2006 at 01:21 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
06-28-2006 01:15 AM
Profile PM Find Quote Report
The_Joker
Full Member
***

Avatar
TF

Posts: 125
Joined: Oct 2005
RE: RE: RE: Registry Editing in scripts.
quote:
Originally posted by CookieRevised
The proper syntax for a "return" statement is:
    return <variable>;

and "value = Shell.RegRead(MsgPlus.ScriptRegPath + key)" is not a value but a statement on its own. So either you do:

    var value = Shell.RegRead(MsgPlus.ScriptRegPath + key);
    return value;

or simply:

    return Shell.RegRead(MsgPlus.ScriptRegPath + key);


As I said, it doesn't work either...
The return thing gives an error not matter what I do.

This post was edited on 06-28-2006 at 10:21 AM by The_Joker.
Messenger Plus! 3.61 unofficial Hebrew translator
Messenger Plus! Live unofficial Hebrew translator
06-28-2006 10:20 AM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Registry Editing in scripts.
What is the error code that you get?

And what code do you use exactly?
[Image: 1-0.png]
             
06-28-2006 10:26 AM
Profile PM Web Find Quote Report
The_Joker
Full Member
***

Avatar
TF

Posts: 125
Joined: Oct 2005
RE: RE: Registry Editing in scripts.
quote:
Originally posted by Ezra
What is the error code that you get?

And what code do you use exactly?

1. Back to good old 7.5, so I can't check the error number.

2. The code is/are:
code:
function ReadRegistry(key)
{
    var Shell = new ActiveXObject("WScript.Shell");
    return Shell.RegRead(MsgPlus.ScriptRegPath + key);
}
code:
function ReadRegistry(key)
{
    var Shell = new ActiveXObject("WScript.Shell");
    var value = Shell.RegRead(MsgPlus.ScriptRegPath + key);
    return value;
}
Both gives the same error if I remember correctly.
Messenger Plus! 3.61 unofficial Hebrew translator
Messenger Plus! Live unofficial Hebrew translator
06-28-2006 10:31 AM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Registry Editing in scripts.
Only thing I can think of is that the key doesn't excist...
[Image: 1-0.png]
             
06-28-2006 10:38 AM
Profile PM Web Find Quote Report
The_Joker
Full Member
***

Avatar
TF

Posts: 125
Joined: Oct 2005
RE: RE: Registry Editing in scripts.
quote:
Originally posted by Ezra
Only thing I can think of is that the key doesn't excist...


I checked it exists.
It works okay with Debug.Trace but return doesn't.
Also I checked with regedit, it's there.
Messenger Plus! 3.61 unofficial Hebrew translator
Messenger Plus! Live unofficial Hebrew translator
06-28-2006 10:41 AM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Registry Editing in scripts.
Have you tried the script I posted? Just save it to a seperate JS file then call its function.

I posted it for a reason I know it works cause I actually use it.
06-28-2006 12:18 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: RE: Registry Editing in scripts.
quote:
Originally posted by The_Joker
quote:
Originally posted by Ezra
Only thing I can think of is that the key doesn't excist...

I checked it exists.
It works okay with Debug.Trace but return doesn't.
Also I checked with regedit, it's there.
There is nothing wrong in that latest code. The error is as Ezra suggested the key value you give to the function which doesn't exit or whatever. It works fine here.


This post was edited on 06-29-2006 at 06:18 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
06-29-2006 06:12 PM
Profile PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] 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