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

Pages: (2): « First [ 1 ] 2 » Last »
[request]
Author: Message:
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. [request]
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

This post was edited on 08-28-2006 at 12:43 PM by skyserpent.
08-28-2006 12:42 PM
Profile E-Mail PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [request]
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. :)
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 12:51 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [request]
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

This post was edited on 08-28-2006 at 12:55 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
08-28-2006 12:54 PM
Profile PM Find Quote Report
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
alexp2_ad
Scripting Contest Winner
****

Avatar
Who love the chocolate?

Posts: 691
Reputation: 26
37 / Male / –
Joined: May 2004
Status: Away
RE: [request]
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
08-28-2006 01:31 PM
Profile E-Mail PM Find Quote Report
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. RE: [request]
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
08-28-2006 02:20 PM
Profile E-Mail PM Web Find Quote Report
alexp2_ad
Scripting Contest Winner
****

Avatar
Who love the chocolate?

Posts: 691
Reputation: 26
37 / Male / –
Joined: May 2004
Status: Away
RE: RE: [request]
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.
08-28-2006 02:23 PM
Profile E-Mail PM Find Quote Report
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. RE: [request]
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
08-28-2006 02:26 PM
Profile E-Mail PM Web Find Quote Report
alexp2_ad
Scripting Contest Winner
****

Avatar
Who love the chocolate?

Posts: 691
Reputation: 26
37 / Male / –
Joined: May 2004
Status: Away
RE: RE: [request]
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.
08-28-2006 02:28 PM
Profile E-Mail PM Find Quote Report
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. RE: [request]
ah, i thought it was msn that stopped it not plus... damn patchou lol
08-28-2006 02:32 PM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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