What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » sending message, creating menus and gui

sending message, creating menus and gui
Author: Message:
JonnyT
Junior Member
**


Posts: 28
Joined: Jun 2006
O.P. sending message, creating menus and gui
Im starting to understand how to do things but im having issues with a few things.

first thing is where am i going wrong here. Im trying to send a certain message when #test or #info are typed in. I've tried these two but with no luck.

code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
    if(Message.substr(0, 5) == '#test'){
Message = 'a message';
    }

    if(Message.substr(0, 5) == '#info'){
Message = Message.replace('a messeage');
return Message;
    }
}

another thing is how/where do we create the menus for scripts in the conversation windows and the actualy config windows?

Thanks J
06-26-2006 01:15 PM
Profile E-Mail PM Find Quote Report
mathieumg
Full Member
***


Posts: 181
Reputation: 2
34 / Male / Flag
Joined: May 2004
RE: sending message, creating menus and gui
Try this:

code:
unction OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if(Message.substr(0, 5) == '#test'){
return 'a message';
}

if(Message.substr(0, 5) == '#info'){
return Message.replace('a messeage');
}
}


Though there seems to be missing parameters on your replace function...

As for the menus, they can either be created dynamically using the script files or statically using the SciptInfo.xml file.
Official MessengerPlus! Live French Translator
Official StuffPlug 3 French Translator

:)
06-26-2006 01:21 PM
Profile E-Mail PM Web Find Quote Report
JonnyT
Junior Member
**


Posts: 28
Joined: Jun 2006
O.P. RE: sending message, creating menus and gui
code:
{
if(Message.substr(0, 5) == '#test'){
return 'a message';
}
works great thanks :)

could someone post a very simple demo of the code for the menus/config window?

Thanks J
06-26-2006 04:29 PM
Profile E-Mail PM Find Quote Report
mathieumg
Full Member
***


Posts: 181
Reputation: 2
34 / Male / Flag
Joined: May 2004
RE: sending message, creating menus and gui
It is in the documentation already :p
Official MessengerPlus! Live French Translator
Official StuffPlug 3 French Translator

:)
06-26-2006 04:33 PM
Profile E-Mail PM Web Find Quote Report
JonnyT
Junior Member
**


Posts: 28
Joined: Jun 2006
O.P. RE: sending message, creating menus and gui
ah yeah :$ didnt ee the exampes section, Thanks :D
06-26-2006 04:37 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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