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

Pages: (2): « First [ 1 ] 2 » Last »
Registry Class
Author: Message:
LifelesS
Full Member
***


Posts: 115
Reputation: 4
31 / Male / Flag
Joined: Dec 2006
O.P. Grin  Registry Class
Well, I can just say this came out of the dance of my fingers:P

Ok, I'll say a little more...

It's a class I built so that you easily create, read and delete registry keys.

-------------------------------------------------------------------------------------------
How to use:
        First you need to globally declare: 'var Regs = new Regs(SaveLocation)' -> where SaveLocation is a boolean, if it's 0,
            it will save to MsgPlus.ScriptRegPath + Messenger.UserId, if it's 1 it will save to MsgPlus.ScriptRegPath + Messenger.MyEmail.
       
Then you can use Regs.methods():

            Regs.Del(key)                                 - deletes the 'key' registry;

            Regs.Read(key)                                - reads the 'key' registry;

            Regs.WriteStr(key, value, overwrite)        - writes a string with 'key' name, 'value' value, overwrite is a bool, if omitted, overwrites;

            Regs.WriteBool(key, value, overwrite)        - writes a bool with 'key' name, 'value' - 0/1, overwrite is a bool, if omitted, overwrites;
           
-------------------------------------------------------------------------------------------

The file is on the attachment

.txt File Attachment: _RegsClass.txt (5.68 KB)
This file has been downloaded 145 time(s).
Best Regards,
Joćo Godinho
08-03-2007 07:01 PM
Profile E-Mail 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 Class
Your script looks ok, but it uses the wshell method that can be restrictive sometimes.

Matty made a script that uses the Registry API“s of windows directly

Attached is Matty“s Registry script that is included in Screenshot Sender 4

I“m not sure if there“s a newer version, you should contact Matty about that.

.txt File Attachment: ss4.registry.js.txt (21.47 KB)
This file has been downloaded 163 time(s).

This post was edited on 08-03-2007 at 07:36 PM by Ezra.
[Image: 1-0.png]
             
08-03-2007 07:17 PM
Profile PM Web Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
31 / Male / Flag
Joined: Dec 2006
O.P. RE: Registry Class
there's some problem with your attachment, but I have Matty's script, I'll give it a look :)
Best Regards,
Joćo Godinho
08-03-2007 07:19 PM
Profile E-Mail 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 Class
There“s nothing wrong with my attachment?
[Image: 1-0.png]
             
08-03-2007 07:21 PM
Profile PM Web Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
31 / Male / Flag
Joined: Dec 2006
O.P. RE: Registry Class
btw, what do u mean by restrictive?


quote:
There“s nothing wrong with my attachment?

I just see a lot of this

quote:
�/�/� �R�e�g�i�s�t�r�y� �v�a�l�u�e� �t�y�p�e�s�
�
�    �v�a�r� �R�E�G�_�N�O�N�E� �=� �0�;�    �    �    �    �    �    �    �    �/�*� �'�N�o� �v�a�l�u�e� �t�y�p�e�'�    �    �    �    �    �    �    �    �    �*�/�
�
�    �v�a�r� �R�E�G�_�S�Z� �=� �1�;�    �    �    �    �    �    �    �    �    �/�*� �'�U�n�i�c�o�d�e� �n�u�l� �t�e�r�m�i�n�a�t�e�d� �s�t�r�i�n�g�'�    �    �    �    �    �    �*�/�
�
Best Regards,
Joćo Godinho
08-03-2007 07:23 PM
Profile E-Mail 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 Class
quote:
Originally posted by LifelesS
btw, what do u mean by restrictive?

IIRC there was a limit of some kind, can't remember exactly.

And Matty's script allows Enumeration of keys.

quote:
Originally posted by LifelesS
I just see a lot of this

That's probably because your browser can't figure out that the file encoding is UCS2-LE (UTF16-LE)

EDIT: Searching the forums I found at least one thing:
quote:
Originally posted by J-Thread
Tip
RegWrite will write at most one DWORD to a REG_BINARY value. Larger values are not supported with this method.

EDIT2: Found some more:
quote:
Originally posted by CookieRevised
RegWrite, RegRead and RegDelete are the only ones that JScript knows and those methods are very, and I mean very, limited.

eg:

    * You can not check if a registry key exists or not with RegRead; it will produce an error. => can be worked around using error checking.
    * You can not write bigger values than a DWORD to a binary registry value (this means no binary data strings for example)
    * You can not write a REG_MULTI_SZ value with RegWrite
    * You can not enumerate registry keys
    * and the list goes on...

This post was edited on 08-03-2007 at 08:05 PM by Ezra.
[Image: 1-0.png]
             
08-03-2007 07:28 PM
Profile PM Web Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
31 / Male / Flag
Joined: Dec 2006
O.P. RE: RE: Registry Class
quote:
Originally posted by Ezra
quote:
Originally posted by LifelesS
btw, what do u mean by restrictive?

IIRC there was a limit of some kind, can't remember exactly.

Humm... kk

quote:
Originally posted by Ezra
quote:
Originally posted by LifelesS
I just see a lot of this

That's probably because your browser can't figure out that the file encoding is UCS2-LE (UTF16-LE)


Using Firefox...


I'm looking at the file now, still going to take some time to undersand it all, it starts going a little out of my knowledge :P
Best Regards,
Joćo Godinho
08-03-2007 07:34 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Registry Class
quote:
Originally posted by LifelesS
I just see a lot of this
Because you saved the file as Unicode that is why the board isn't showing it properly. It assumes that the charset for a text file is ANSI not UNICODE.

However not to rain on anyones parade but I did make an updated version of the Registry editor. The previous one was a joke this one uses DRY (Don't Repeat Yourself - Eljay :P)

Attached is the newer version.

The functions included are:
  • Registry_CreateKey
  • Registry_DeleteKey
  • Registry_DeleteKeyValue
  • Registry_KeyExist
  • Registry_KeyValueExist
  • Registry_EnumSubkeys
  • Registry_EnumKeys
  • Registry_GetKeyValue
  • Registry_SetKeyValue
  • Registry_CloseKey

.zip File Attachment: registry.zip (2.53 KB)
This file has been downloaded 130 time(s).
08-03-2007 08:16 PM
Profile E-Mail PM Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
31 / Male / Flag
Joined: Dec 2006
O.P. RE: RE: Registry Class
quote:
Originally posted by matty
However not to rain on anyones parade but I did make an updated version of the Registry editor. The previous one was a joke this one uses DRY (Don't Repeat Yourself - Eljay :P)


:cownana: The more the better :D
Best Regards,
Joćo Godinho
08-03-2007 08:19 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Registry Class
I forgot to mention over the weekend or sometime next week I will be extending the functionality and including RegDeleteTree and RegCopyTree, now because these are native to Windows Vista I will have to code the Windows XP side myself but that wont be a problem. What is the use you ask? None really Just it would be nice to have a full Registry Class (although mine isn't a class it is still good haha.)
08-03-2007 08:23 PM
Profile E-Mail 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