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

Tips
Author: Message:
Plan-1130
Full Member
***

I keep askin' myself: why?

Posts: 142
73 / Male / –
Joined: Feb 2005
RE: Tips
Accessing the registry, without getting errors (see attachment):

Both variable and path should not begin with a slash (/).

ExistsRegistry (
[optional string] sub directory in the script's registry key,
[optional string] variable  in the script's registry key
)
Returns true if exists, false if not exists

DeleteRegistry (
[optional string] sub directory in the script's registry key,
[optional string] variable to remove, if not set, the whole directory will be removed
)
Deletes a variable or key.

ReadRegistry (
[optional string] sub directory in the script's registry key,
[optional string] variable to read from,
[optional string] default value in case the variable is not set yet
)
Reads the value of a key or variable, returns the value if found, returns default value if set, returns null if failed.

WriteRegistry (
[optional string] sub directory in the script's registry key,
[optional string] variable to read from,
[string] value to write,
[boolean] whether or not to overwrite if set already
)
Writes a value to a key or variable, returns the written value if overwrite is true or value did not exist, returns original value if overwrite is false and value did exist, returns null if failed.


Examples:
code:
ExistsRegistry("example", "MyAge");
// returns false

ReadRegistry("example", "MyAge");
// returns null

WriteRegistry("example", "MyAge", 16);
// writes 16, returns 16

ExistsRegistry("example", "MyAge");
// returns true

WriteRegistry("example", "MyAge", 17, false);
// does not write, returns 16

DeleteRegistry("example", "MyAge");
// deletes value

ReadRegistry("example", "MyAge", 17);
// writes 17, returns 17

WriteRegistry("example", "MyAge", 18);
// writes 18, returns 18

DeleteRegistry("example");
// deletes whole example key

both
code:
WriteRegistry("example", "MyAge", 16, false);
and
code:
ReadRegistry("example", "MyAge", 16);
will write and return 16 if value does not exist, and won't write but will return the original value if it does exist.

.txt File Attachment: Registry Access.txt (6.27 KB)
This file has been downloaded 955 time(s).

This post was edited on 10-25-2006 at 08:22 PM by Plan-1130.
My Scripts: UltimatFlooder, Advanced PSM Chat, PlusPrivacy, PlusRemote

[Image: Plan-1130.png]
10-25-2006 08:15 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Tips - by surfichris on 03-13-2006 at 12:06 PM
RE: Tips - by -dt- on 03-13-2006 at 12:11 PM
RE: Tips - by segosa on 03-13-2006 at 12:39 PM
RE: Tips - by surfichris on 03-13-2006 at 01:13 PM
RE: Tips - by Volv on 04-19-2006 at 06:29 AM
RE: Tips - by -dt- on 04-19-2006 at 06:57 AM
RE: Tips - by davidt on 08-15-2006 at 09:21 AM
RE: RE: Tips - by CookieRevised on 10-21-2006 at 01:44 AM
RE: Tips - by Plan-1130 on 10-25-2006 at 08:15 PM
RE: Tips - by matty on 10-25-2006 at 08:21 PM
RE: Tips - by tryxter on 01-08-2007 at 06:46 PM
RE: Tips - by CookieRevised on 01-28-2007 at 01:15 AM
RE: Tips - by Matti on 06-02-2007 at 05:02 PM
RE: Tips - by Matti on 06-07-2007 at 05:38 PM
RE: Tips - by henry1817 on 12-30-2009 at 04:13 PM
RE: Tips - by matty on 12-30-2009 at 04:20 PM
RE: Tips - by whiz on 06-24-2010 at 10:53 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