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

Pages: (2): « First « 1 [ 2 ] Last »
Silent Messages
Author: Message:
bigbob85
Full Member
***

Avatar
Is Good, Is Bob...

Posts: 128
Reputation: 4
36 / Male / Flag
Joined: Jul 2003
O.P. RE: Silent Messages
All this talk about ChatWnd is making my head spin, but I think I got a good idea.

I dont think its SendMessage that draws the windows focus, its the OpenChat. So if I dont do that, and just use the ChatWnd Iterator and then see if the contact I want to send it to is in the chat (and there is only 1 person in the chat) to then send the message. Thus, avoiding the OpenChat.

I'll try it and see if it works.

EDIT:
code:
Debug.Trace("Currently opened chat windows:");
var Windows = Messenger.CurrentChats;
var e = new Enumerator(Windows);
for(; !e.atEnd(); e.moveNext()){
    var ChatWindow = e.item();
    if (ChatWindow.Contacts.Count == 1){
        var f = new Enumerator(ChatWindow.Contacts);
        for(; !f.atEnd(); f.moveNext()){
            var Contact = f.item();
            Debug.Trace(" " + Contact.Email);
        }
    }
}

That what I made, it works to :D. Might also be able to be used in my IRC Style Chats script aswell.

Thanks for your help everyone.

EDIT 2 :

Heres a BETA version of the script. Its getting there :D.
This version is mostly operational, it just dosn't have advanced settings (Like, dont send to this contact when they are busy).

Also checks if Music Now Playing is installed.

http://bigbob85.insaneparadox.com/msgplus/script.php?scr=NP%20Updater

This post was edited on 01-19-2007 at 04:38 AM by bigbob85.
01-19-2007 12:31 AM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Silent Messages
quote:
Originally posted by bigbob85
All this talk about ChatWnd is making my head spin, but I think I got a good idea.

I dont think its SendMessage that draws the windows focus, its the OpenChat. So if I dont do that, and just use the ChatWnd Iterator and then see if the contact I want to send it to is in the chat (and there is only 1 person in the chat) to then send the message. Thus, avoiding the OpenChat.
That will only work if there is already a chat with that contact. If there isn't a chat open with the contact, SendMessage (and your script) will fail and produce an error.

Also note that in order to SendMessage to work, the chat window must be the active window and in focus! If it is not, SendMessage will bring the chat window automatically in front too (and restore the previous window when it is done sending). This is how Plus! works.

Also, no matter what you do, do not forget to check with EditChangeAllowed if you actually can send a message to the chat window. This is mandatory! See scripting documentation MsgPlus:: SendMessage.


PS: if the initial goal from the beginning was to only send a message when there is an existing chat window, then in the future please specify such important details. Many stuff depends on what one wants to do exactly, and if one doesn't provide such details, decent help can not be given.

This post was edited on 01-19-2007 at 02:15 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
01-19-2007 02:07 PM
Profile PM Find Quote Report
bigbob85
Full Member
***

Avatar
Is Good, Is Bob...

Posts: 128
Reputation: 4
36 / Male / Flag
Joined: Jul 2003
O.P. RE: Silent Messages
Well, the script isn't bringing it to the top (not that I can see).
I thought I did say that this is only ment to send if the contact window is open.

And as for the chat window must be on top, and active.. Not true. Download the script and give it a go. It doesn't interrupt full screen games either.

Ill add the EditChangeAllowed check. I also have to make it more clear, that at the moment, this only works for Winamp.

EDIT :
Link : http://bigbob85.insaneparadox.com/msgplus/script.php?scr=NP%20Updater

This post was edited on 01-19-2007 at 11:13 PM by bigbob85.
01-19-2007 11:12 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Silent Messages
quote:
Originally posted by bigbob85
Well, the script isn't bringing it to the top (not that I can see).
SendMessage always does, but as said, it restores the previous window when it is done. All this, depending on your PC speed, can be in a blink of an eye...

quote:
Originally posted by bigbob85
And as for the chat window must be on top, and active.. Not true.
true true... This is how SendMessage works... SendMessage will make the window active, otherwise Plus! can't actually send the message.


PS: forum search: "Sending message without opening window.."

This post was edited on 01-20-2007 at 03:29 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
01-20-2007 03:20 AM
Profile PM Find Quote Report
bigbob85
Full Member
***

Avatar
Is Good, Is Bob...

Posts: 128
Reputation: 4
36 / Male / Flag
Joined: Jul 2003
O.P. RE: Silent Messages
But if it were actually bringing the window to the top, it'd interrupt the full screen games wouldn't it?

I got an Intel Core2 Duo 1.8ghz, 1gb ram. I don't consider it really fast, but it still is very very quick (maby I'm not using it right :P)
01-20-2007 08:44 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