The MsgPlus::ScriptRegPath property returns the full registry path to the current script's settings. You can use this key as you see fit (add values, create sub keys, etc...) to store settings pertinent to your script.
This is a read-only property. [string] ScriptRegPath;
A string containing the path to the script's registry key. The path begins with "HKCU\" to designate the HKEY_CURRENT_USER key and ends with a backslash.
It is highly recommended that your script uses this key to save data in the registry. It will help keeps things organized for the user and the data will be controlled by Messenger Plus! (for uninstallation for example). For more information about the registry functions available for your script, see Windows Scripting Host Functions.
The following example writes a value called "EnableOpt" in the registry and read it back.
//Write the value var Shell = new ActiveXObject("WScript.Shell"); var ValRegPath = MsgPlus.ScriptRegPath + "EnableOpt"; Shell.RegWrite(ValRegPath, 1); //Read the value var EnableOpt = Shell.RegRead(ValRegPath); Debug.Trace("EnableOpt current value: " + EnableOpt);
Object | MsgPlus |
---|---|
Availability | Messenger Plus! Live 4.00 |