Shoutbox

Interop.Call send message - 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)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Interop.Call send message (/showthread.php?tid=86072)

Interop.Call send message by sargheras on 09-21-2008 at 01:56 PM

Hi all.
How can i send a message to a contact through Interop command? I know that ChatWnd object has a sendMessage method but i don't want to use it if it's possible


RE: Interop.Call send message by ShawnZ on 09-21-2008 at 02:18 PM

quote:
Originally posted by sargheras
Hi all.
How can i send a message to a contact through Interop command? I know that ChatWnd object has a sendMessage method but i don't want to use it if it's possible

...why not?

interop.call is for something else altogether...
RE: Interop.Call send message by Spunky on 09-21-2008 at 02:19 PM

You don't use the Interop command. That is used for Windows Messages, not for messages to contacts.

You need to get a ChatWnd object (from OnEvent_ContactSigin() for example) and then use ChatWnd.SendMessage("this is a line of text\nthis is the second line")



RE: Interop.Call send message by SmokingCookie on 09-21-2008 at 02:49 PM

Well, you can, by sending a sh*t load of messages into the ChatWnd object (to set the text field's text, for example, or get to push the "send" button).

But that's a lot of work for something you can do by simply using ChatWnd::SendMessage();


RE: Interop.Call send message by sargheras on 09-21-2008 at 02:49 PM

I'm searching a way to send more than 16 message with a script, I thought that sending it directly from Interop.call could be an easy way.

with this command i can send a nudge, is there something similar?

code:
Interop.Call("user32","SendMessageW",Window,273,689,0)

RE: Interop.Call send message by SmokingCookie on 09-21-2008 at 02:55 PM

What version of WLM are you using?


RE: Interop.Call send message by sargheras on 09-21-2008 at 02:58 PM

8.5.1302.1018


RE: Interop.Call send message by SmokingCookie on 09-21-2008 at 03:02 PM

The CMD id of the Send button is 272.
Use the ChatWnd::EditText property to "type" text in the field.

You may want to check if the edit text can be changed (for example, if your contact is blocked, it can not). You can do that using ChatWnd::EditChangeAllowed.

EDIT::

But that is not a way to get around the flood protection of WLM itself. You'd have to patch Messenger (if the flood protection is not server-side).


RE: Interop.Call send message by sargheras on 09-21-2008 at 03:06 PM

Thanks a lot. Is there a way to find a command code? A site, a program (I know only spy++) or something else?

EDIT:

272 command doesn't work. how did you find it?


RE: Interop.Call send message by SmokingCookie on 09-21-2008 at 03:24 PM

Use the resource extractor from Messenger Plus! Live itself in the Skin section of the preferences. Then open up the Definitions and look for CMD ids.

In addition, you can open the "Consolidated windows" folder, search for the window style and look for things like "send" or "send message".

EDIT:: These CMDs are sent in the form of a WM_COMMAND message (just to make sure you're aware of this).


RE: Interop.Call send message by ShawnZ on 09-21-2008 at 03:29 PM

it won't work


RE: Interop.Call send message by sargheras on 09-21-2008 at 03:34 PM

I have seen, but why not?