Hi,
Im trying to create a script which logs me in automatically in several accounts. I know there is one out there, but its bugged. Tried fixing it, but it's too messed up to understand it.
The error i get is that the script is defective and that it can't be started.
Here is my code:
JScript code:
if(Messenger.Version >= 8.5)
{
var WLMkey = 'SOFTWARE\\Microsoft\\MSNMessenger';
var WLMexe = 'SOFTWARE\\Microsoft\\Windows Live\\Messenger';
}
else
{
var WLMkey = 'SOFTWARE\\Microsoft\\MSNMessenger';
var WLMexe = WLMkey;
}
var MPLkey = 'SOFTWARE\\Patchou\\Messenger Plus! Live';
//var MPLscriptkey = (MsgPlus.ScriptRegPath).replace(/HKCU\\/i, '');
var delayOpenWnd = 2000;
function OnEvent_Initialize(MessengerStart)
{
if ( Messenger.MyStatus < STATUS_INVISIBLE ) return;
MsgPlus.AddTimer('windowDelayer', delayOpenWnd);
}
function OnEvent_Uninitialize(MessengerExit)
{
MsgPlus.CancelTimer('windowDelayer');
}
function SetDefaultAccount()
{
var emailList = new Array();
emailList.push('mailaddress@hotmail.com');
emailList.push('mailaddress@hotmail.com');
emailList.push('mailaddress@hotmail.com');
for(int i = 0; i < emailList.length; i++)
{
var email = emailList[i];
SetBinaryValue(HKEY_CURRENT_USER, WLMkey + '\\PerPassportSettings', 'DefaultMemberName', email);
SetStringValue(HKEY_CURRENT_USER, MPLkey, 'DefaultUser', email);
ExecuteWLM();
}
//Debug.Trace('Set default account: ' + email);
}
function ExecuteWLM()
{
new ActiveXObject("Shell.Application").ShellExecute("C:/Program Files (x86)/Windows Live/Messenger/" + "msnmsgr.exe", "", "", "open", 1);
}
function OnEvent_Timer(timerId)
{
switch(timerId)
{
case 'windowDelayer':
SetDefaultAccount();
break;
default:
}
}
Can't seem to get the code highlighted..