Shoutbox

ChatWnd.SendMessage stops - 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: ChatWnd.SendMessage stops (/showthread.php?tid=64371)

ChatWnd.SendMessage stops by H-J on 08-02-2006 at 05:30 PM

Hello,

I've a problem with sendig a lot of text by using ChatWnd.SendMessage. Afther 15 entries the chatwindow accept no input from the ChatWnd.SendMessage function. Is that a security? By that, how can I overrule the security?
I ve also tried with a wait/sleep but that doesnot work. (setTimeout("moveNext()", 1000)) afther 10 rows. Also the wait.dll does not make me happy. does not work or I make mistake.. . :$

Can someone help me?



                if (RSSong.EOF)
                {
                    ChatWnd.SendMessage("+.+ Niets gevonden" );
                }
                else
                {
                    ChatWnd.SendMessage("+.+ Wel wat gevonden met " + ZoekenNaar );
                    var aa = 1
                    while (!RSSong.EOF)
                    {
                      if(aa == 10)
                      {
                        Interop.Call(MsgPlus.ScriptFilesPath+'\\Wait.dll', "Attente", 2000);
                        Interop.FreeDLL(MsgPlus.ScriptFilesPath+'\\Wait.dll');
                        RSSong.moveNext();
                        var aa = 1
                      }
                      else
                      {
                        aa = aa + 1
                        ChatWnd.SendMessage("+.+ ID:"+RSSong("ID").Value+" ---- " + RSSong("artist").Value + ", " + RSSong("title").Value);
                        RSSong.moveNext();
                      }

                    }
                }
                RSSong.Close();


RE: ChatWnd.SendMessage stops by absorbation on 08-02-2006 at 05:32 PM

quote:
Originally posted by H-J
Afther 15 entries the chatwindow accept no input from the ChatWnd.SendMessage function. Is that a security?

Yeh, there is a limit of what you can send :P.
RE: ChatWnd.SendMessage stops by H-J on 08-02-2006 at 05:37 PM

Great....  I love scripting... :'(

But, how can I post more rows?
By waiting to send?


RE: ChatWnd.SendMessage stops by rob_botch on 08-02-2006 at 05:41 PM

AFAIK the only way to send messages again is if the contact sends a message, or the user sends one manually.

Hope this helps

Robert


RE: ChatWnd.SendMessage stops by H-J on 08-02-2006 at 06:07 PM

Thx but no option.
I want to create a music request robot. The problem shows when a MSNchat person request a title list. The script search in SQL and returns several rows. By row 15 it stops....
The setTimeout() doesnot work. I get an object error. My idea was to freeze the SQLoutput. To bad.


RE: ChatWnd.SendMessage stops by foaly on 08-02-2006 at 06:12 PM

can't you send in one message??


RE: ChatWnd.SendMessage stops by rob_botch on 08-02-2006 at 06:23 PM

As foaly said, sending the list in one message would probably be the best way to solve this. You can send a lot of lines in one message. The "\n" string introduces a new line. I believe that this has been discussed on these forum in passing in connection with the Fileserver script.

Hope this helps

Robert


RE: ChatWnd.SendMessage stops by Patchou on 08-02-2006 at 06:53 PM

What you're experiencing is the flood protection mechanism. It prevents scripts to send more than 15 messages within 20 seconds. If you add a timer to send your messages one after the other in a short interval( let's say 1 second) then it should work fine.


RE: ChatWnd.SendMessage stops by alexp2_ad on 08-02-2006 at 06:58 PM

Is there really a need for flood protection?  Is it just in case people make infinite loops by accident or is it just to stop people making flooders?

Because I could make a script that would delete half of someones registry and critical system files, record their passwords and email them to me or never let them sign in without removing the script... but I couldn't make a flooder?

Ah well, doesn't matter, it rarely gets in the way of legitimate scripting anyway I suppose, just seems like an unnecessary restriction to me.


RE: ChatWnd.SendMessage stops by Plik on 08-02-2006 at 07:02 PM

Wouldn't it be possible to simulate the user sending a message by putting your message in the edit box with your script, then simulating and enter keypress?

Just a thought, i havn't tried it myself ;)


RE: ChatWnd.SendMessage stops by Patchou on 08-02-2006 at 07:06 PM

Well, think about it another way: 20 messages within 15 seconds... I do think that if you send more in such a short period of time, you'll be most likely annoying people.


RE: RE: ChatWnd.SendMessage stops by alexp2_ad on 08-02-2006 at 07:09 PM

quote:
Originally posted by Patchou
Well, think about it another way: 20 messages within 15 seconds... I do think that if you send more in such a short period of time, you'll be most likely annoying people.

True enough.

That said, if you send 1 nudge you'll be most likely annoying people.  :p
RE: RE: ChatWnd.SendMessage stops by H-J on 08-02-2006 at 07:11 PM

quote:
Originally posted by Patchou
If you add a timer to send your messages one after the other in a short interval( let's say 1 second) then it should work fine.


Yeah, That is what i want to do. But if I juse setTimeout("RSSong.moveNext()", 600) I get the error: Object expected.
  (Code: -2146823281)
Do I use the function setTimeout wrong or is it not supported?

RE: ChatWnd.SendMessage stops by deAd on 08-02-2006 at 07:30 PM

It means that setTimeout is not a function. You can use a Plus! timer though :)


RE: RE: ChatWnd.SendMessage stops by H-J on 08-02-2006 at 07:32 PM

quote:
Originally posted by deAd
It means that setTimeout is not a function. You can use a Plus! timer though :)


:$
RE: ChatWnd.SendMessage stops by R4000 on 10-01-2006 at 08:28 PM

Im making a 'bot' as such using msgplus, but it stops after 15 msg... even if the user types...

Its annoying cause of my number guessing script, they keep guessing numbers, ut after 14... it locks up.

any way around this?


RE: ChatWnd.SendMessage stops by CookieRevised on 10-01-2006 at 08:46 PM

quote:
Originally posted by R4000
Im making a 'bot' as such using msgplus, but it stops after 15 msg... even if the user types...

Its annoying cause of my number guessing script, they keep guessing numbers, ut after 14... it locks up.

any way around this?
read the thread and especially Patchou's answer...

quote:
Originally posted by alexp2_ad
Because I could make a script that would delete half of someones registry and critical system files, record their passwords and email them to me or never let them sign in without removing the script... but I couldn't make a flooder?
you're comparing two different things though. Your script which records all that stuff must be run by the user. A flooder doesn't need to be run by the user in order to flood him.

in other words: I have a choice to install/run your malicious script and as such it would be my own responsebility and I can do something about it/prevent it from happening, but I don't have a choice and I can't prevent it from happening if you start to flood me with a script you're running.
RE: ChatWnd.SendMessage stops by matty on 10-01-2006 at 09:07 PM

The way around this would be get the handle of the Chat Window (really easy as its a property of the ChatWnd object).

Use the PostMessage API to send the text to the window then you can simulate pressing Enter. That is a way around the flood protection.