Shoutbox

Current open convosations - 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: Current open convosations (/showthread.php?tid=66872)

Current open convosations by fOme on 10-01-2006 at 11:39 PM

Hello I am attempting to create a script which says how many convosations windows I currently have open/chating to.

I am a total noob and I was woundering if someone would be kind enough to please post me some source on how to do this!


Thanks in advance for the help.


RE: Current open convosations by DarkMe on 10-01-2006 at 11:41 PM

if you want ti display them in your psm you could use PSM+
http://shoutbox.menthix.net/showthread.php?tid=64514


RE: Current open convosations by Spunky on 10-01-2006 at 11:42 PM

The code to use is

code:
var myVar = Messenger.CurrentChats;


If you are just looking for a script to do it rather than learning the language, you could just use my script, PSM+, which can do this (amongst many other things). The link should be in my signature ;)

EDIT: :o Beaten to it!
RE: RE: Current open convosations by fOme on 10-01-2006 at 11:42 PM

quote:
Originally posted by DarkMe
if you want ti display them in your psm you could use PSM+
http://shoutbox.menthix.net/showthread.php?tid=64514


Thanks for the post but I would rather have just the plain simple source for this one feature.

I am planning to combind the many features I currently have into one script..
RE: Current open convosations by Plik on 10-01-2006 at 11:45 PM

You could use the Messenger.CurrentChats property to get a ChatWnds object containing all the open chats, and then use the count property of the ChatWnds object to get the count.

code:
var chatWndsObj = Messenger.CurrentChats;
var chatCount = chatWndsObj.count;
And the varible chatCount would contain the number of open chats

All these propertys and more info on them can be found in the scripting documentation

Note about the previous replys: Please the correct help, or don't bother at all. If you had taken your time to look into the question you would have been able to give the complete and correct answer straight away![/cookie mode <3] :P
RE: Current open convosations by deAd on 10-01-2006 at 11:47 PM

quote:
Originally posted by SpunkyLoveMuff
The code to use is
code:
var myVar = Messenger.CurrentChats;


That would not work. That would return a ChatWnds object, not a number.


f0me, please read the documentation (you can find it in the script database).

To count the amount of chats you have open, use:
code:
var nChats = Messenger.CurrentChats.Count;
To set that to your Personal Message, use:
code:
Messenger.MyPersonalMessage = "I currently have " + nChats + " chats open."
You would want to reset the message periodically. The best way would be to use the OnEvent_ChatWndCreated and OnEvent_ChatWndDestroyed events.

EDIT: Beat me to it, plik :P
RE: Current open convosations by Spunky on 10-01-2006 at 11:47 PM

OMG! How did I miss out "var chatCount = chatWndsObj.count;"?

I made a whole script based on it :o


RE: Current open convosations by fOme on 10-01-2006 at 11:49 PM

Excellent thanks for the fast replys!

I thank you all for your help.