What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [request]

[request]
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [request]
quote:
Originally posted by SpunkyLoveMuff
do you mean send it to the typing area before sending it?
Well, if that is what he wants, this is the code:
code:
//This function requires 2 parameters, a ChatWnd object and a message string
function sendMsg(Wnd, msg) {
   //When there's no chatwindow specified, set it to the 1st open window
   if (typeOf(Wnd) == "undefined") {
      var e = new Enumerator(Messenger.CurrentChats);
      Wnd = e.item();
   }
   //When no message is defined, set it to something else
   if (typeOf(msg) == "undefined") msg = "Lemons";

   //Save the current edit text
   var editText = Wnd.EditText;
   //Set the window's edit text to the message
   Wnd.EditText = msg;
   //Send the message
   Wnd.SendMessage(msg);
   //Reset the edit text
   Wnd.EditText = editText;
}
//You can then use it in any function, like the MenuClicked event
function OnEvent_MenuClicked(Id, Location, OriginWnd) {
   if (Id == "MnuSendMsg" && Location == 2) {
      sendMsg(OriginWnd, "I clicked the menu in the chatwindow!");
   } else {
      sendMsg(OriginWnd, "I clicked the menu in the contact list!");
   }
}

But I still have no idea why you should want to see the message before it's sended. :P

quote:
Originally posted by SpunkyLoveMuff
Mattike - you got there before me :P
Belgian speed mate. (H)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
08-28-2006 01:17 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[request] - by skyserpent on 08-28-2006 at 12:42 PM
RE: [request] - by Matti on 08-28-2006 at 12:51 PM
RE: [request] - by Spunky on 08-28-2006 at 12:54 PM
RE: [request] - by Matti on 08-28-2006 at 01:17 PM
RE: [request] - by alexp2_ad on 08-28-2006 at 01:31 PM
RE: [request] - by skyserpent on 08-28-2006 at 02:20 PM
RE: RE: [request] - by alexp2_ad on 08-28-2006 at 02:23 PM
RE: [request] - by skyserpent on 08-28-2006 at 02:26 PM
RE: RE: [request] - by alexp2_ad on 08-28-2006 at 02:28 PM
RE: [request] - by skyserpent on 08-28-2006 at 02:32 PM
RE: RE: [request] - by alexp2_ad on 08-28-2006 at 02:34 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