sendmessage mirc

Just starting out? Need help? Post your questions and find answers here.
Britney
New User
New User
Posts: 8
Joined: Tue Oct 21, 2003 2:06 pm

sendmessage mirc

Post 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.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post 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?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Britney
New User
New User
Posts: 8
Joined: Tue Oct 21, 2003 2:06 pm

Post by Britney »

Karbon! Hi there, I wrote a PB program to autoreply to your ten thousand emails, hope you got them safely.
Post Reply