What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Prevent closing chats?

Pages: (2): « First [ 1 ] 2 » Last »
Prevent closing chats?
Author: Message:
Jesus
Scripting Contest Winner
****

Avatar
Koffie, my cat ;)

Posts: 623
Reputation: 15
37 / Male / Flag
Joined: Jul 2005
O.P. Prevent closing chats?
Hi all,

I wrote a small script which should prevent me from closing a chat just after receiving a message (like in aMSN), but so far I've only managed to show a toast with the contact's name and message when I close the chat too fast.

My question is: Is there a way to stop a chat window from closing?

Another option is to reopen the chat immediately, but I don't know if it's possible to show the conversation after the window has been closed.
08-16-2006 12:55 PM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Prevent closing chats?
I know how to do this, but it requires a DLL and a keyboard hook.
[Image: spartaafk.png]
08-16-2006 02:09 PM
Profile PM Web Find Quote Report
Jesus
Scripting Contest Winner
****

Avatar
Koffie, my cat ;)

Posts: 623
Reputation: 15
37 / Male / Flag
Joined: Jul 2005
O.P. RE: Prevent closing chats?
hmm I've never done that... is it hard to do?
08-16-2006 04:17 PM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Prevent closing chats?
Not massively really. If you like, I can post some code later today for you to look at.
[Image: spartaafk.png]
08-17-2006 08:31 AM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Prevent closing chats?
quote:
Originally posted by RaceProUK
I know how to do this, but it requires a DLL and a keyboard hook.
to intercept ALT-F4... But what about all the other ways you can close a chat? Isn't it better to hook the window and intercept the close window message?
.-= A 'frrrrrrrituurrr' for Wacky =-.
08-17-2006 08:34 AM
Profile PM Find Quote Report
Jesus
Scripting Contest Winner
****

Avatar
Koffie, my cat ;)

Posts: 623
Reputation: 15
37 / Male / Flag
Joined: Jul 2005
O.P. RE: RE: Prevent closing chats?
quote:
Originally posted by RaceProUK
Not massively really. If you like, I can post some code later today for you to look at.

that would be great :)
08-17-2006 08:39 AM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Prevent closing chats?
quote:
Originally posted by CookieRevised
quote:
Originally posted by RaceProUK
I know how to do this, but it requires a DLL and a keyboard hook.
to intercept ALT-F4... But what about all the other ways you can close a chat? Isn't it better to hook the window and intercept the close window message?
I actually intercept Escape. As for the message, the window still wants to be able to be closed, so some sort of special logic will be needed to handle it.
[Image: spartaafk.png]
08-17-2006 08:46 AM
Profile PM Web Find Quote Report
Delphi Thunderbolt
Junior Member
**

Avatar
The insane developer

Posts: 53
Reputation: 1
34 / Male / –
Joined: Sep 2004
RE: Prevent closing chats?
A better way would be to intercept the actual windows API message that closes the window (WM_CLOSE, or something like that; Use a program like MessageSpy++ to find out).

Edit:
Coding in Windows API is not that hard to do, and if you're fluent in another natively compilable language (Like Delphi or C++), you could probably create a DLL that wraps all the API code you need, and simplify your script's code and operation by getting the DLL to handle all the messy stuff.

I have effectively used WM_NCACTIVATE to detect a flash event to any window, all you need to figure out is how to detect and cancel out that API message and you've practically covered all your bases in terms of closing conversation windows.

You'll need to get your hands dirty in Windows API to be able to use this effectively, but well worth it and rewarding.

Hope that helps.

This post was edited on 08-17-2006 at 01:49 PM by Delphi Thunderbolt.
[Image: thundtacuserbar.gif]

It's my freedom, it's my duty, it's my war.

The day will go dark and quiet as the mighty Thunderbolts announce the end of the world...
08-17-2006 01:45 PM
Profile E-Mail PM Web Find Quote Report
Jesus
Scripting Contest Winner
****

Avatar
Koffie, my cat ;)

Posts: 623
Reputation: 15
37 / Male / Flag
Joined: Jul 2005
O.P. RE: Prevent closing chats?
Well I'm not afraid to (try to) learn something, so I'll take a look at it.
08-17-2006 02:55 PM
Profile PM Find Quote Report
Delphi Thunderbolt
Junior Member
**

Avatar
The insane developer

Posts: 53
Reputation: 1
34 / Male / –
Joined: Sep 2004
RE: Prevent closing chats?
quote:
Originally posted by Jesus
Well I'm not afraid to (try to) learn something, so I'll take a look at it.

Heh, it only took me (*counts on fingers, mumbles and adds numbers*) 12 months to learn it and code (or look for code) it :P
[Image: thundtacuserbar.gif]

It's my freedom, it's my duty, it's my war.

The day will go dark and quiet as the mighty Thunderbolts announce the end of the world...
08-18-2006 05:10 AM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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