Page 1 of 1

sendmessage mirc

Posted: Tue Oct 21, 2003 2:13 pm
by Britney
Im pretty new to this, so this is really all I have:
#WM_MCOMMAND = #WM_USER + 200

OpenFile(0,"d:\mirc.txt")
gah=CreateFileMapping_(UseFile(0),#NULL,#PAGE_READONLY,0,4096,"mIRC")
Debug gah
mHwnd=findwindow_("mIRC",0)
Debug mHwnd
cool=SendMessage_(mHwnd,#WM_MCOMMAND,2,0)
Debug cool
Here is what the mirc help says:
SendMessage(mHwnd, WM_MCOMMAND, cMethod, 0L)

mHwnd mIRC window, or Channel/Query/etc. window
WM_MCOMMAND WM_USER + 200
cMethod 1 - As if typed in editbox
2 - As if typed in editbox, send as plain text
4 - Use flood protection if turned on
Can be or'd with 1 or 2
Returns 0 if fails, 1 if successful

SendMessage(mHwnd, WM_MEVALUATE, 0, 0L)

mHwnd mIRC window, or Channel/Query/etc. window
WM_MEVALUATE WM_USER + 201
Returns 0 if fails, 1 if successful

The application that sends these messages should create a
mapped file named "mIRC" with CreateFileMapping(). When mIRC
receives the above messages, it will open this file and use
the data it contains to perform the command or evaluation.

In the case of an evaluation, mIRC will output the results
to the mapped file.
What I wanted was a computer-idle time, mouse etc, to send a message to mirc to let them know I was away. Anti-idle in mirc alone does not neccesarily mean I'm away :) If anyone can show me a basic way to work with, I'd appreciate it. It looks interesting.

Posted: Tue Oct 21, 2003 5:12 pm
by Karbon
That code is great and all but I just wanted to tell you that I'm SUCH a big fan. And now that I know you're into programming I'm going to send you even MORE letters.

And you didn't mean anything by that restraining order, did you?

Posted: Tue Oct 21, 2003 7:07 pm
by Britney
Karbon! Hi there, I wrote a PB program to autoreply to your ten thousand emails, hope you got them safely.