What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Sending message without opening window..

Sending message without opening window..
Author: Message:
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
O.P. Sending message without opening window..
Is there a way to do that?

I know about sending it like this:

myWnd.SendMessage(Msg);
myWnd.SendMessage("/close");

But I needed something that didn't bring the window up because it takes focus out of my program and that messes things up for me.


Thanks

EDIT:  Solution: It's possible with a hook and it's done already. Just search for BotDKLive dell made by Mr.Huge in Plugins section and use it in your script to send Invisible messages.

This post was edited on 10-19-2006 at 12:23 PM by Deco.
10-17-2006 08:50 PM
Profile E-Mail PM Web Find Quote Report
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
33 / Male / Flag
Joined: Dec 2004
RE: Sending message without opening window..
Something like this script?
Twitter: @ChrisLozeau
10-17-2006 09:12 PM
Profile PM Find Quote Report
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
33 / Male / Flag
Joined: Dec 2004
RE: Sending message without opening window..
Won't work for me either.

Oh wait.. you need to wait until some one speaks to you. D'oh!
It does work.

This post was edited on 10-17-2006 at 09:35 PM by Chris4.
Twitter: @ChrisLozeau
10-17-2006 09:32 PM
Profile PM Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
O.P. RE: Sending message without opening window..
No not like that script

Thanks
10-18-2006 02:40 PM
Profile E-Mail PM Web Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Sending message without opening window..
code:
ChatWnd.SendMessage("testing");//Send the Message
Interop.Call("User32", "SendMessageW", ChatWnd.Handle, 274, 0xF020);//Minimize the chat window

code:
ChatWnd.SendMessage("testing");//Send the Message
Interop.Call("User32","SendMessageW", ChatWnd.Handle, 16, 0, 0);//Close the Window


That won't show up the window and send your message too :P. Chose any of the code above as you wish to close or minimize the window [Image: msn_wink.gif].

Edited

This post was edited on 10-18-2006 at 03:08 PM by Felu.
10-18-2006 03:03 PM
Profile E-Mail PM Web Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
O.P. RE: Sending message without opening window..
Didn't work.

Maybe my tab out problem is related to me creatinng the chat window to send the message?

Here's my code:

code:
function SendMsg(Email,Message) {
    var myWnd = Messenger.OpenChat(Email);
    myWnd.SendMessage(Message); 
    Interop.Call("User32", "SendMessageW", myWnd.Handle, 274, 0xF020);
    }


Thanks for helping
10-18-2006 03:21 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Sending message without opening window..
quote:
Originally posted by Deco
Is there a way to do that?

I know about sending it like this:

myWnd.SendMessage(Msg);
myWnd.SendMessage("/close");

But I needed something that didn't bring the window up because it takes focus out of my program and that messes things up for me.


Thanks
The problem in your request is that messages need to be send to a contact (sounds strange as I write it :p).

What I mean is: in order to send a message to a contact you, or messenger or whatever else for that matter, must open a session to that contact. This can only be done:
1- by opening a conversation window
2- by making your own protocol talking thingie which opens the session, talks to the switchboard, deals with server messages, etc

The latter is extremely difficult, and will almost result in your own IM client compatible with the Mssenger protocol anyways. So not so doable in practice or for this purpose.

The former is the only thing you can do. A trick you could do is hiding the chat window once you opened it. But you still need to open it and thus it will stil be 'visible' to the user (even if it was for a brief 100 milliseconds). Not to mention you need to take a lot of issues into account also (eg: make sure the contact is online, he isn't blocked, or check you don't accidently send an SMS, etc).

If it is just to prevent the chat from stealing the focus: that's the way the Plus! script engine works. Plus! _needs_ to bring the chat window in focus in order to be able to send a message. However, once this has been done it _should_ put the focus back to what it was.

This post was edited on 10-18-2006 at 03:41 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-18-2006 03:39 PM
Profile PM Find Quote Report
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
O.P. RE: Sending message without opening window..
Thanks Cookie. I knew you'd save my day.

At least now I know not to try this through script and do it with my own messenger client thingie.

Thanks
10-18-2006 03:49 PM
Profile E-Mail PM Web 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