[request] |
Author: |
Message: |
skyserpent
Junior Member
Bacon
Posts: 96
32 / / –
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
This post was edited on 08-28-2006 at 12:43 PM by skyserpent.
|
|
08-28-2006 12:42 PM |
|
|
Matti
Elite Member
Script Developer and Helper
Posts: 1646 Reputation: 39
32 / /
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...
Can you clarify your request a bit more, since I think it's a bit vague. Thanks.
|
|
08-28-2006 12:51 PM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
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
_____________________________________________________________________________
100th Post
This post was edited on 08-28-2006 at 12:55 PM by Spunky.
<Eljay> "Problems encountered: shit blew up"
|
|
08-28-2006 12:54 PM |
|
|
Matti
Elite Member
Script Developer and Helper
Posts: 1646 Reputation: 39
32 / /
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.
quote: Originally posted by SpunkyLoveMuff
Mattike - you got there before me
Belgian speed mate.
|
|
08-28-2006 01:17 PM |
|
|
alexp2_ad
Scripting Contest Winner
Who love the chocolate?
Posts: 691 Reputation: 26
37 / / –
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.
|
|
08-28-2006 01:31 PM |
|
|
skyserpent
Junior Member
Bacon
Posts: 96
32 / / –
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 |
|
|
alexp2_ad
Scripting Contest Winner
Who love the chocolate?
Posts: 691 Reputation: 26
37 / / –
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 |
|
|
skyserpent
Junior Member
Bacon
Posts: 96
32 / / –
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 |
|
|
alexp2_ad
Scripting Contest Winner
Who love the chocolate?
Posts: 691 Reputation: 26
37 / / –
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 |
|
|
skyserpent
Junior Member
Bacon
Posts: 96
32 / / –
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 |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|