What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help]Closing a window upon remote text.

[Help]Closing a window upon remote text.
Author: Message:
yoshiko
New Member
*

Avatar
"Script Kiddie"!? Who? Me?

Posts: 3
– / Female / Flag
Joined: May 2008
O.P. [Help]Closing a window upon remote text.
Hello.

First, i'm sorry if this has been asked before, i've been looking for a while through already done scripts, the official documentation, and searchs through this subforum.

I want to add a small multi-contact chat feature to my script (JabberChatroom-Alike), so the first thing i need is try to %$· close a window.

I realized that for closing the window, i could require use the command /close , so, in this code:
code:
    if(Message.charAt(0)=="." && Message.charAt(1)=="/" && Message.charAt(2)=="x" && Message.charAt(3)==" "){
   
    }
i tried to add the SendMessage("/close"); command, and also calling the On_ChatWndSendMessage(ChatWnd, Message); , but seems senseless, to not say i also tried to do something like ChatWnd.Close , but didnt work.

So, may i ask for guidance? Thank you in advance ^^
code:
bottle = 10
while bottle>=0:
  print "With this",bottle,"bottles that i have, and this one i give to ya, there is a total of",bottle-1,"in my hands!"
  bottle=bottle-1
  raw_input()
print "With this 0 bottles i have, and those 10 bottles i've gave, is time to think, about ask to you!"
raw_input()
05-30-2008 10:31 AM
Profile E-Mail PM Web Find Quote Report
foaly
Senior Member
****

Avatar

Posts: 718
Reputation: 20
38 / Male / Flag
Joined: Jul 2006
RE: [Help]Closing a window upon remote text.
well that code has to be in de onrecieved event... so you'll get something like this:

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind){
  if(Message.charAt(0)=="." && Message.charAt(1)=="/" && Message.charAt(2)=="x" && Message.charAt(3)==" "){
  ChatWnd.SendMessage("/close");
}
}


that should work...
05-30-2008 11:47 AM
Profile E-Mail PM Find Quote Report
yoshiko
New Member
*

Avatar
"Script Kiddie"!? Who? Me?

Posts: 3
– / Female / Flag
Joined: May 2008
O.P. RE: RE: [Help]Closing a window upon remote text.
quote:
Originally posted by foaly
well that code has to be in de onrecieved event... so you'll get something like this:

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind){
  if(Message.charAt(0)=="." && Message.charAt(1)=="/" && Message.charAt(2)=="x" && Message.charAt(3)==" "){
  ChatWnd.SendMessage("/close");
}
}


that should work...

The code was already on the recievemessage function, though i didnt to paste the full code because there are snippets i dont want to give by now ^^

I was pretty looking for this:
code:
ChatWnd.SendMessage("/close");
Thank you! ^^

EDIT:
So, now i'm facing another problem.

I'm using ChatWnd.SendMessage(); to send messages i recieve to the rest of open windows, using /msgall , but it seems to send the same message various times (3 messages of around 10 lines, wich only the last line of those currently has the message).

So, ideas? O.o

This post was edited on 05-30-2008 at 12:13 PM by yoshiko.
code:
bottle = 10
while bottle>=0:
  print "With this",bottle,"bottles that i have, and this one i give to ya, there is a total of",bottle-1,"in my hands!"
  bottle=bottle-1
  raw_input()
print "With this 0 bottles i have, and those 10 bottles i've gave, is time to think, about ask to you!"
raw_input()
05-30-2008 11:54 AM
Profile E-Mail PM Web Find Quote Report
« 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