What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » MultiChat vs Group Chat

MultiChat vs Group Chat
Author: Message:
wincy
Junior Member
**


Posts: 67
Reputation: 4
34 / Male / Flag
Joined: Feb 2008
O.P. MultiChat vs Group Chat
Hey guys,
since plus! can't read Groups (new wlm9.0 function), is there a "hack" or trick to get around this? I mean, can i detect if a chat window is a multi-conversation or a group window?
I think that the only difference between them is that multichat opens automatically while group windows must be opened manually by the user.
Have you got any suggestion on how to use this information?
Maybe checking a relation between OnEvent_ChatWndCreated and OnEvent_ChatWndReceiveMessage?

Otherwise, is it possibile to read chatwindow's text with some external scripting?

[Image: gruppoa.jpg]

Thanks in advance for help.
11-16-2009 03:53 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: MultiChat vs Group Chat
quote:
Originally posted by wincy
Hey guys,
since plus! can't read Groups (new wlm9.0 function), is there a "hack" or trick to get around this?
No.

quote:
Originally posted by wincy
I mean, can i detect if a chat window is a multi-conversation or a group window?
No.

You can't even check on the number of contacts (oChatWnd.Contacts.Count). Because that doesn't say a thing about the chat window being a group chat or a multi-contact conversation either. In fact, even a group chat or a multi-contact convo could have just 2 people: you and 1 contact. So checking on the number of contacts in the conversation isn't a reliable way either to see if it is a group convo, a multi-contact convo or a simple one-to-one chat.

quote:
Originally posted by wincy
I think that the only difference between them is that multichat opens automatically while group windows must be opened manually by the user.
Nope. You can start a multi-contact chat too.

quote:
Originally posted by wincy
Have you got any suggestion on how to use this information?
You can't....

Not until Plus! exposes a way for this, something similar like ChatWnd::IsMobileChat.
Eg: ChatWnd::IsMultiChat and ChatWnd::IsGroupChat.

quote:
Originally posted by wincy
Maybe checking a relation between OnEvent_ChatWndCreated and OnEvent_ChatWndReceiveMessage?
I don't see how that is going to help you though.

quote:
Originally posted by wincy
Otherwise, is it possibile to read chatwindow's text with some external scripting?
Wouldn't do any good anyways.

Even if you read the window caption, you can not derive from it if it is a group chat, multi-contact chat, or one-to-one chat.

The only possible way I see, for now, (and very maybe) is using the Accessibility APIs to see what kind of (windowless) controls are present on the chat window. Because in a group chat you have slightly different controls/objects. But this isn't as easy as it sounds, and I don't know how reliable that is because of the fact that people can skin conversation windows.

------

Why do you need this?

This post was edited on 11-16-2009 at 06:37 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-16-2009 06:33 PM
Profile PM Find Quote Report
wincy
Junior Member
**


Posts: 67
Reputation: 4
34 / Male / Flag
Joined: Feb 2008
O.P. RE: MultiChat vs Group Chat
quote:
Originally posted by CookieRevised
You can't even check on the number of contacts (oChatWnd.Contacts.Count). Because that doesn't say a thing about the chat window being a group chat or a multi-contact conversation either. In fact, even a group chat or a multi-contact convo could have just 2 people: you and 1 contact. So checking on the number of contacts in the conversation isn't a reliable way either to see if it is a group convo, a multi-contact convo or a simple one-to-one chat.

Well.. if there are more than 2 contacts it's certainly a "multichat" or "group" conversation, and i guess that Group is used only if at least 2 people other than me are online. Otherwise my friend will contact me with a normal chat window. (A)

quote:
Originally posted by CookieRevised
quote:
Originally posted by wincy
I think that the only difference between them is that multichat opens automatically, while group windows must be opened manually by the user.

Nope. You can start a multi-contact chat too.

When i start a multi-contact chat i open a single conversation windows, and then add other contacts.
When i open a group, is because i want to chat with people that are already there.
That's why if a window opened by me with more contacts already inside it should be a Group. *-)

quote:
Originally posted by CookieRevised
quote:
Originally posted by wincy
Maybe checking a relation between OnEvent_ChatWndCreated and OnEvent_ChatWndReceiveMessage?

I don't see how that is going to help you though.

A multi-contact conversation automatically opens when, after adding me, someone write a message.
A Group conversation only opens when i start it, so maybe if there is no delay between OnEvent_ChatWndCreated and ChatWndReceiveMessage that could be a multi-contact...?
^o)


quote:
Originally posted by CookieRevised
Even if you read the window caption, you can not derive from it if it is a group chat, multi-contact chat, or one-to-one chat.
That's what i was thinking:
One-to-one chat has contact's name and email as title.
Multichat has more values (name <email>, name <email>, ecc...) as title.
Groups have only a single name.

quote:
Originally posted by CookieRevised
The only possible way I see, for now, (and very maybe) is using the Accessibility APIs to see what kind of (windowless) controls are present on the chat window. Because in a group chat you have slightly different controls/objects. But this isn't as easy as it sounds, and I don't know how reliable that is because of the fact that people can skin conversation windows.
Do you mean the top toolbar buttons ("photos, files, videos, call, etc..")?


I know that actualy there isn't a certain method of doing this, but i was wondering if there are some tricks or "things that statistically could work for most people"...

I'm using a function like:
http://www.msgpluslive.it/scripts/view/96-Group-Conversation-Warning

which warns you when you're invited in a multi-chat (not Group, like script name says..). But, as warmth told me, it's quite annoying if confirmation window appear also when I open a Group conversation...

Thanks for your help :)
11-16-2009 10:08 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: MultiChat vs Group Chat
quote:
Originally posted by wincy
quote:
Originally posted by CookieRevised
You can't even check on the number of contacts (oChatWnd.Contacts.Count). Because that doesn't say a thing about the chat window being a group chat or a multi-contact conversation either. In fact, even a group chat or a multi-contact convo could have just 2 people: you and 1 contact. So checking on the number of contacts in the conversation isn't a reliable way either to see if it is a group convo, a multi-contact convo or a simple one-to-one chat.
Well.. if there are more than 2 contacts it's certainly a "multichat" or "group" conversation, and i guess that Group is used only if at least 2 people other than me are online. Otherwise my friend will contact me with a normal chat window. (A)
That's what people might do. But that is not a definition of a 'group' chat at all though. As soon as you click on a group (no matter if there are 10 people online or even just you), it is considered a group chat from the POV of a program/script/programmer.


quote:
Originally posted by wincy
quote:
Originally posted by CookieRevised
quote:
Originally posted by wincy
I think that the only difference between them is that multichat opens automatically, while group windows must be opened manually by the user.
Nope. You can start a multi-contact chat too.
When i start a multi-contact chat i open a single conversation windows, and then add other contacts.
When i open a group, is because i want to chat with people that are already there.
That's why if a window opened by me with more contacts already inside it should be a Group. *-)
Yes, but that is besides the point and can not be used as a definition or a way to check if there is a group or multi-contact chat. Because the point is that you can not check who has started the chat, which would be needed if you want to follow this path of thinking.

eg: a group chat can either be started by you, or by any other contact who is also in the group. And just the number of contacts in a group chat don't define the chat as a group. Because you can have a group with only 1 person in it too. It wont work.

quote:
Originally posted by wincy
quote:
Originally posted by CookieRevised
quote:
Originally posted by wincy
Maybe checking a relation between OnEvent_ChatWndCreated and OnEvent_ChatWndReceiveMessage?
I don't see how that is going to help you though.
A multi-contact conversation automatically opens when, after adding me, someone write a message. A Group conversation only opens when i start it, so maybe if there is no delay between OnEvent_ChatWndCreated and ChatWndReceiveMessage that could be a multi-contact...? ^o)
Absolutely not. A one-to-one chat initiated by a contact starts in the exact same way: without a delay between OnEvent_ChatWndCreated and ChatWndReceiveMessage.

quote:
Originally posted by wincy
quote:
Originally posted by CookieRevised
Even if you read the window caption, you can not derive from it if it is a group chat, multi-contact chat, or one-to-one chat.
That's what i was thinking:
One-to-one chat has contact's name and email as title.
Multichat has more values (name <email>, name <email>, ecc...) as title.
Groups have only a single name.
Nope, not always.
A one-to-one chat's title does not always have the syntax "name <email>". It highly depends on stuff like the nickname (which could contain characters like '<', '>' and ',' for that matter too), if the contact or you have actually registered/confirmed the Windows Live ID, and if the contact has added you to his list (or something like that; can't confirm that last one, but I have a strong feeling after some initial tests). I have also seen Multi-contact chats which do not have multiple values seperated by a comma in the title bar (might be a bug though). And a group name can again contain characters like '<', '>' and commas too...

Thus the bottom line is that this is again not a 100% reliable way of checking for such things.

quote:
Originally posted by wincy
quote:
Originally posted by CookieRevised
The only possible way I see, for now, (and very maybe) is using the Accessibility APIs to see what kind of (windowless) controls are present on the chat window. Because in a group chat you have slightly different controls/objects. But this isn't as easy as it sounds, and I don't know how reliable that is because of the fact that people can skin conversation windows.
Do you mean the top toolbar buttons ("photos, files, videos, call, etc..")?
Nope, I actually didn't meant those,  I meant other objects in the window itself. But, yes, you could maybe use those buttons too (eg: the "Go to group site" button). But speaking of which, maybe instead check upon the menus in that case, thus not the buttons. Because for the buttons you need the Accessibility APIs because they all are windowless controls. For the menus you can probably use standard Windows menu APIs. And then you can check upon the existance and/or the state of some particular menus. But again, I dunno how reliable that is either as those menus can easily chance between versions, etc.

But as it is now, it might be the only way (at least most reliable way) to see the difference...
Though remember that the actual caption of a menu depends on the local/translation of program. So, try not to use those to check if a certain menu exists, but rather the menu IDs themselfs.

quote:
Originally posted by wincy
I'm using a function like:
http://www.msgpluslive.it/scripts/view/96-Group-Conversation-Warning

which warns you when you're invited in a multi-chat (not Group, like script name says..). But, as warmth told me, it's quite annoying if confirmation window appear also when I open a Group conversation...
Indeed, and that is because it simply checks on the number of contacts being bigger than 2 at the moment of window creation, nothing more.

PS: It wont warn you when you add more people to a one-to-one chat, or when you start a multi-contact chat from the start using the "Actions" menu, because it only checks upon the creation of a window and a multi-contact chat (started by yourself) always starts with 1 contact before adding the other contacts automatically.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-17-2009 02:51 AM
Profile PM Find Quote Report
wincy
Junior Member
**


Posts: 67
Reputation: 4
34 / Male / Flag
Joined: Feb 2008
O.P. RE: MultiChat vs Group Chat
Well, my purpose was to stop those annoying multichat window with too many people that maybe you don't even know. I suppose that if i'm a member of a Group is because i would like receive messages or something from those people, without confirmation on window open.
So if i open i single chat and then invite other people conversation warning is definitely not needed, as for groups, in my opinion.

Anyway, i understand that for now it's too hard to do what i'm asking... I really hope Patchou will find a solution, because a ChatWnd::IsGroupChat, as you said, could be really useful!

Thanks again for help!
New idea! (H)
How about checking if contacts in multi-contact chat are in my contact list? For example, if contacts > 5 and most of the contacts are not in my list, it is probably an annoying multi-contact window, and not a group i subscribed to, so i will ask confirmation 8-)
11-17-2009 12:12 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: MultiChat vs Group Chat
quote:
Originally posted by wincy
Well, my purpose was to stop those annoying multichat window with too many people that maybe you don't even know.
You can't "stop" or "prevent" them. The warning you'll get from that script happens _after_ the mtuli-contact chat was established. By that time, all those unknown people would already had the chance to see your Windows Live ID. To realy stop such forced invites you need to sniff and alter the protocol messages. And even then, a 'smart' contact (who is sniffing the protocol himself) would be able to see your Windows Live ID. This is one of the major shortcommings (and privacy issues) in the MSN protocol.
quote:
Originally posted by wincy
Anyway, i understand that for now it's too hard to do what i'm asking...
If you simply want the confirmation not to be shown when you are in a group chat, you could try to use the menu-trick to check if the chat is a group chat or a multi-contact chat. It should work, in theory.

quote:
Originally posted by wincy
New idea! (H)
How about checking if contacts in multi-contact chat are in my contact list? For example, if contacts > 5 and most of the contacts are not in my list, it is probably an annoying multi-contact window, and not a group i subscribed to, so i will ask confirmation 8-)
Very unreliable... Everything that depends on the number of contacts, or on contacts in general is unreliable for this. You can never get proper or enough information from the contacts object to differentiate between type of chats, it will always be major guesswork and assumptions.

Instead, use the menu-trick. It is the most reliable of all as it does not depend on anything at all, except for Messenger itself creating the window in a particular way.

This post was edited on 11-17-2009 at 05:04 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-17-2009 05:00 PM
Profile PM Find Quote Report
wincy
Junior Member
**


Posts: 67
Reputation: 4
34 / Male / Flag
Joined: Feb 2008
O.P. RE: MultiChat vs Group Chat
quote:
Originally posted by CookieRevised
Instead, use the menu-trick. It is the most reliable of all as it does not depend on anything at all, except for Messenger itself creating the window in a particular way.

I'm not sur that i'll be able to do something like that...
I only know JScript. What should i use? Could you give me some useful links or some code as a starting point? I'll try to work on this then...

Thanks for your help and suggestion
11-17-2009 06:56 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: MultiChat vs Group Chat
You need to have experience with Windows APIs. Messenger Plus! adds the ability to its internal JScript language to work with Windows APIs. Everything about the Windows APIs can be found in the MSDN library. The APIs you need to look for are the menu APIs like 'GetMenu'.

But if you're not experienced in that then it is very difficult to do properly (although the basics are easy). Maybe someone else will write a function for you in that case (if people see this thread)... And if I find some time I might do it myself, but that wont be before next week...

This post was edited on 11-17-2009 at 07:49 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-17-2009 07:48 PM
Profile PM Find Quote Report
wincy
Junior Member
**


Posts: 67
Reputation: 4
34 / Male / Flag
Joined: Feb 2008
O.P. RE: MultiChat vs Group Chat
Hello!
I've been busy for few days, i've just looked msdn library and found this:

http://msdn.microsoft.com/en-us/library/ms646977%28VS.85%29.aspx

If you were talking about this GetMenu function, i wrote this:

code:
function OnEvent_ChatWndCreated(ChatWnd){
    var MyMenu = Interop.Call("user32", "GetMenu", ChatWnd.Handle);
}
If it is correct, what should i do now?

Thanks for your help

Edit: Humm.. it seems that it doesn't works... maybe it's not so simple...
Any help will be really appreciated...



This post was edited on 11-24-2009 at 12:14 AM by wincy.
11-23-2009 11:17 PM
Profile E-Mail PM 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