Shoutbox

Sending message without opening window.. - 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: Sending message without opening window.. (/showthread.php?tid=67425)

Sending message without opening window.. by Deco on 10-17-2006 at 08:50 PM

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.


RE: Sending message without opening window.. by Chris4 on 10-17-2006 at 09:12 PM

Something like this script?


RE: Sending message without opening window.. by Chris4 on 10-17-2006 at 09:32 PM

Won't work for me either.

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


RE: Sending message without opening window.. by Deco on 10-18-2006 at 02:40 PM

No not like that script

Thanks


RE: Sending message without opening window.. by Felu on 10-18-2006 at 03:03 PM

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
RE: Sending message without opening window.. by Deco on 10-18-2006 at 03:21 PM

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

RE: Sending message without opening window.. by CookieRevised on 10-18-2006 at 03:39 PM

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.
RE: Sending message without opening window.. by Deco on 10-18-2006 at 03:49 PM

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