quote:
Originally posted by Matty
code:
function OnEvent_ChatWndReceiveMessage(pChatWnd, sOrigin, sMessage, nMessageKind){
pChatWnd.SendMessage('i sent this message through my script');
}
Just an example, however every time someone sends a message (including you, it will send that message).
Now I have this, but it doesn't work:
code:
function OnEvent_Initialize(MessengerStart)
{
LoadPlugin_VB('BotjePlus.plusin')
}
function OnEvent_Uninitialize(MessengerExit)
{
PluginObj = null;
}
function LoadPlugin_VB(ProgId)
{
var PluginObj = new ActiveXObject(ProgId);
if(PluginObj)
{
if(PluginObj.Initialize(8, "", undefined) == true)
Debug.Trace("The VB plugin has been initialized");
}
}
function OnEvent_ChatWndReceiveMessage(pChatWnd, sOrigin, sMessage, nMessageKind)
{
if (nMessageKind==1)
{
var strText = pluginobj.GetReaction(sMessage);
pChatWnd.SendMessage(strText);
}
}
What am I doing wrong?