Shoutbox

[request] - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [request] (/showthread.php?tid=65503)

[request] by skyserpent on 08-28-2006 at 12:42 PM

is there actually some code that inserts text you want to appear into the text box and then sends it? intead of just sending the text like

ChtWndSendMessage("Lemons"); < if thats even right lol ive just got up leave me alone :P


RE: [request] by Matti on 08-28-2006 at 12:51 PM

You can simply use ChatWnd.SendMessage() to send a message in a chatwindow, I don't really understand what you want else... :P

Can you clarify your request a bit more, since I think it's a bit vague. Thanks. :)


RE: [request] by Spunky on 08-28-2006 at 12:54 PM

Erm, do you mean send it to the typing area before sending it? It should be possible. Don't know if it would work 100%  though

EDIT - Mattike, you got there before me :p
_____________________________________________________________________________

100th Post


RE: [request] by Matti on 08-28-2006 at 01:17 PM

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)

RE: [request] by alexp2_ad on 08-28-2006 at 01:31 PM

That's exactly how the SendMessage function works btw, it stores the edit text, places text in, simulates pressing the enter button and places the text back. :P


RE: [request] by skyserpent on 08-28-2006 at 02:20 PM

thanks for that alexp!

just one more thing how could i intregrate that sending code into this script?

code:
var Wnd = null;
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
    if(Message == 'BOMB!') {
        Wnd = ChatWnd;
        MsgPlus.AddTimer("Bomb",500);
        return "";
    }
    if(Message == 'STOP!') {
        Wnd = null;
        MsgPlus.CancelTimer("Bomb");
        return "";
    }
}

function OnEvent_Timer(tId) {
    if(Wnd != null) {
        Wnd.SendMessage("Lemons");
        MsgPlus.AddTimer("Bomb",500);
    }
}

thanks for any help
RE: RE: [request] by alexp2_ad on 08-28-2006 at 02:23 PM

quote:
Originally posted by skyserpent
thanks for that alexp!

just one more thing how could i intregrate that sending code into this script?

code:
var Wnd = null;
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
    if(Message == 'BOMB!') {
        Wnd = ChatWnd;
        MsgPlus.AddTimer("Bomb",500);
        return "";
    }
    if(Message == 'STOP!') {
        Wnd = null;
        MsgPlus.CancelTimer("Bomb");
        return "";
    }
}

function OnEvent_Timer(tId) {
    if(Wnd != null) {
        Wnd.SendMessage("Lemons");
        MsgPlus.AddTimer("Bomb",500);
    }
}

thanks for any help


The code posted won't help get round the flood protection, it still uses SendMessage, and doesn't simulate pressing the enter key, so it won't help you perform evil acts of spam.
RE: [request] by skyserpent on 08-28-2006 at 02:26 PM

ok :( lol evil acts of spam. like i said before, i probably would ever use it. i wanted it because if you send text yourself it doesnt stop after 16 even if you do it as fast as the script does. its confusing


RE: RE: [request] by alexp2_ad on 08-28-2006 at 02:28 PM

quote:
Originally posted by skyserpent
ok :( lol evil acts of spam. like i said before, i probably would ever use it. i wanted it because if you send text yourself it doesnt stop after 16 even if you do it as fast as the script does. its confusing

It's because Patchou put flood protection on plus scripts to stop one of the bad uses of it.
RE: [request] by skyserpent on 08-28-2006 at 02:32 PM

ah, i thought it was msn that stopped it not plus... damn patchou lol


RE: RE: [request] by alexp2_ad on 08-28-2006 at 02:34 PM

quote:
Originally posted by skyserpent
ah, i thought it was msn that stopped it not plus... damn patchou lol

Lol, perhaps you should go ask for WGA cracks and say "damn bill gates" on http://forums.microsoft.com/ too. :P