What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Msg Plus 5 question about Reg

Msg Plus 5 question about Reg
Author: Message:
ChaosMaker
New Member
*


Posts: 4
79 / Male / Flag
Joined: Jun 2010
O.P. Msg Plus 5 question about Reg
I would like to know how to write and read records with messenger plus 5.
I was trying this:
code:
var Send=0;
var Received=0;
var _last_msg='';
var _last_name='';
var _song;
var SHELL=new ActiveXObject("WScript.shell");
var _PATH1=MsgPlus.ScriptFilesPath+"\\RECEIVED";
var _PATH2=MsgPlus.ScriptFilesPath+"\\SEND";
var _PATH3=MsgPlus.ScriptFilesPath+"\\NAME";
var _PATH4=MsgPlus.ScriptFilesPath+"\\MSG";

function Status()
{
    ChatWnd.SendMessage("Status "+Messenger.MyName);
};

function Save()
{
    SHELL.RegWrite(_PATH1,Received);
    SHELL.RegWrite(_PATH2,Send);
    SHELL.RegWrite(_PATH3,_last_name);
    SHELL.RegWrite(_PATH4,_last_msg);
};

function Load()
{
Received=SHELL.RegRead(_PATH1);
Send=SHELL.RegRead(_PATH2);
_last_name=SHELL.RegRead(_PATH3);
_last_msg=SHELL.RegRead(_PATH4);
};

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind)
{
    if (Origin!=Messenger.MyName)
    {
    Received++;
        if (Message!="status")
        {
        _last_msg=Message;
        _last_name=Origin;
        }
    Messenger.MyPersonalMessage=_last_name+" say:"+_last_msg;
    }else
    {
        if (Message!="status")
        {
        Send++;
        }
    }
    if (Message=="status")
    {//\0Music\01\0Listening to {0} - {1} ({2})\0
    _song=Messenger.MyCurrentMedia;
    _song=_song.replace("0Listening to {0} - {1} ({2})","");
    ChatWnd.SendMessage("Status "+Messenger.MyName+"\nMessagens enviadas: ["+Send+"]\nMensagens recebidas: ["+Received+"]\nMusica atual: ["+_song+"]\nUltima mensagem por: ["+_last_name+"]\n assunto: ["+_last_msg+"]");
    };
   
        if (Message=="save")
        {
        ChatWnd.SendMessage("Registros salvos com sucesso!");
        Save();
        }else
        if (Message=="load")
        {
        ChatWnd.SendMessage("Registros carregados com sucesso!");
        Load();
        }
};

but the following error occurred in debug.

code:
Error: Invalid root in registry key "C: \ Program Files \ Yuna Software \ Messenger Plus! \ WLM-Scripts \ Status \ RECEIVED. (code: -2147024893)
        File: Status.js. Line: 27.


another question is how to create the class equal to c + + in javascript?
How do I create arrays in messenger plus 5?
02-11-2011 01:53 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Msg Plus 5 question about Reg - by ChaosMaker on 02-11-2011 at 01:53 AM
RE: Msg Plus 5 question about Reg - by whiz on 02-12-2011 at 12:46 PM


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