MultiChat vs Group Chat - 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: MultiChat vs Group Chat (/showthread.php?tid=92938) MultiChat vs Group Chat by wincy on 11-16-2009 at 03:53 PM
Hey guys, RE: MultiChat vs Group Chat by CookieRevised on 11-16-2009 at 06:33 PM
quote:No. quote: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:Nope. You can start a multi-contact chat too. quote:You can't.... Not until Plus! exposes a way for this, something similar like ChatWnd::IsMobileChat. Eg: ChatWnd::IsMultiChat and ChatWnd::IsGroupChat. quote:I don't see how that is going to help you though. quote: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? RE: MultiChat vs Group Chat by wincy on 11-16-2009 at 10:08 PM
quote: 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. quote: 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: 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...? quote: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: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 RE: MultiChat vs Group Chat by CookieRevised on 11-17-2009 at 02:51 AM
quote: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: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: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: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: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: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. RE: MultiChat vs Group Chat by wincy on 11-17-2009 at 12:12 PM
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. New idea! 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 RE: MultiChat vs Group Chat by CookieRevised on 11-17-2009 at 05:00 PM
quote: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: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: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. RE: MultiChat vs Group Chat by wincy on 11-17-2009 at 06:56 PM
quote: 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 RE: MultiChat vs Group Chat by CookieRevised on 11-17-2009 at 07:48 PM
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'. RE: MultiChat vs Group Chat by wincy on 11-23-2009 at 11:17 PM
Hello! code: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... |