Why use a txt file, and not just the registry?
EDIT: Like this:
code:
var sleutel = "Status";
function OnEvent_Signout(Email)
{
var status = Messenger.MyStatus;
WriteRegistry(sleutel + "\\" + Email, status);
}
function OnEvent_SigninReady(Email)
{
try
{
var status = ReadRegistry(sleutel + "\\" + Email);
Messenger.MyStatus = status;
}
catch(err)
{
WriteRegistry(sleutel + "\\" + Email, "0");
}
}
function WriteRegistry(key, value)
{
var Shell = new ActiveXObject("WScript.Shell");
var ValRegPath = MsgPlus.ScriptRegPath + key;
Shell.RegWrite(ValRegPath, value);
}
function ReadRegistry(key)
{
var Shell = new ActiveXObject("WScript.Shell");
return value = Shell.RegRead(MsgPlus.ScriptRegPath + key);
}
EDIT: Added a plsc file for easy importing
EDIT2: Forgot that multiple users can use msn, will edit, for the time beiing, don't use it
EDIT3: Added multiple users support, also updated the plsc file for easy importing.