What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Again a code that a really need

Again a code that a really need
Author: Message:
phalanxii
Full Member
***


Posts: 146
Reputation: 5
32 / Male / Flag
Joined: Aug 2006
Status: Away
RE: Again a code that a really need
All of what you want can be found in the scripting documentation (OnGetScriptMenu, OnEvent_MenuClicked, Script Info File Schema Documentation). I don't want to write the code for you, because it's better if you learn; but here is an example for you:
code:
function OnGetScriptMenu(Location) {
   if (Location == 2) { // Script menu in chat window
      var ScriptMenu = "<ScriptMenu>";
      ScriptMenu += "<SubMenu Label=\"SubMenu 1\">";
      ScriptMenu +=    "<MenuEntry Id=\"MnuFeat1\">Feature 1</MenuEntry>";
      ScriptMenu +=    "<MenuEntry Id=\"MnuFeat2\">Feature 2</MenuEntry>";
      ScriptMenu += "</SubMenu>";
      ScriptMenu += "<SubMenu Label=\"SubMenu 2\">";
      ScriptMenu +=    "<MenuEntry Id=\"MnuFeat3\">Feature 3</MenuEntry>";
      ScriptMenu +=    "<MenuEntry Id=\"MnuFeat4\">Feature 4</MenuEntry>";
      ScriptMenu += "</SubMenu>";
      ScriptMenu += "</ScriptMenu>";
      return ScriptMenu;
   }
}

function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd) {
   if (Location == 2) {
      if (MenuItemId == "MnuFeat1") OriginWnd.SendMessage("Message 1");
      if (MenuItemId == "MnuFeat2") OriginWnd.SendMessage("Message 2");
      if (MenuItemId == "MnuFeat3") OriginWnd.SendMessage("Message 3");
      if (MenuItemId == "MnuFeat4") OriginWnd.SendMessage("Message 4");
   }
}
This will create a script menu in your chat window only with the name of your script. It will have menus something like this:
code:
"Your Script Name" > "SubMenu 1" > "Feature 1"
                                   "Feature 2"
                   > "SubMenu 2" > "Feature 3"
                                   "Feature 4"
When each of the Feature x menus are clicked, it will send a message to the chat window "Message x".

NOTE: You cannot send a message when a submenu is clicked. Plus! scripting only catches when a menu entry is clicked.

Please refer to the above named scripting documentation pages for more info.
01-29-2007 07:10 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Again a code that a really need - by Jumpfreakske on 01-29-2007 at 06:20 AM
RE: Again a code that a really need - by phalanxii on 01-29-2007 at 07:10 AM
RE: Again a code that a really need - by Jumpfreakske on 01-29-2007 at 07:50 PM
RE: Again a code that a really need - by phalanxii on 01-29-2007 at 11:16 PM
RE: Again a code that a really need - by Jumpfreakske on 01-30-2007 at 05:19 AM
RE: Again a code that a really need - by phalanxii on 01-30-2007 at 05:39 AM
RE: Again a code that a really need - by Jumpfreakske on 01-30-2007 at 05:40 AM
RE: Again a code that a really need - by phalanxii on 01-30-2007 at 05:43 AM
RE: Again a code that a really need - by Jumpfreakske on 01-30-2007 at 05:44 AM
RE: Again a code that a really need - by phalanxii on 01-30-2007 at 05:47 AM
RE: Again a code that a really need - by Jumpfreakske on 01-30-2007 at 05:52 AM
RE: Again a code that a really need - by Jumpfreakske on 01-30-2007 at 06:00 AM
RE: Again a code that a really need - by phalanxii on 01-30-2007 at 06:26 AM
RE: Again a code that a really need - by Jumpfreakske on 01-30-2007 at 06:31 AM
RE: Again a code that a really need - by phalanxii on 01-30-2007 at 06:44 AM
RE: Again a code that a really need - by Jumpfreakske on 01-30-2007 at 03:54 PM
RE: Again a code that a really need - by Jumpfreakske on 01-30-2007 at 06:49 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