Shoutbox

[help] - Check # of contacts, and close - 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: [help] - Check # of contacts, and close (/showthread.php?tid=84788)

[help] - Check # of contacts, and close by Cpsgames on 07-12-2008 at 06:30 AM

I'm working on a bot, but i'm stuck on somthing.

I need to know how to check how many contacts are in a conversation when a window is created and if there is more than 1 (and yourself) to close the window.

Comments and help is appreciated, thanks

Chris~


RE: [help] - Check # of contacts, and close by CookieRevised on 07-12-2008 at 06:50 AM

This is very basic scripting knowledge and thus the answer and many details can easly be found in the Official Scripting Documentation if you browse the different functions and objects a little. (click the link or simply choose Help in the Script Editor).

It is not that we don't wanna help you, but as I said, this is such a basic question that you'll find your answer quickly if you read the documentation.


RE: [help] - Check # of contacts, and close by Cpsgames on 07-12-2008 at 10:31 PM

I searched all over the documentation and I can't find it.

Sorry if i'm just missing something thats right in my face, but could you just show me a sample strip of code of what i'm trying to do?


RE: [help] - Check # of contacts, and close by matty on 07-12-2008 at 10:41 PM

code:
function OnEvent_ChatWndCreated ( pChatWnd ) {

}

That is fired when a chat window is opened.
The pChatWnd object has a Contacts property.

Now if you look at the Scripting documentation that CookieRevised directed you to you will notice that under the Objects Reference there is a Contacts object listed. If you look through the properties of that object you should see the property you want to use.

By us just telling you the code you will never learn. But following those directions you should be able to easily find your answer.