From WikiChip
Editing mirc/sendmessage
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
Line 32: | Line 32: | ||
The following call to SendMessage() makes mIRC perform the commands that you specify: | The following call to SendMessage() makes mIRC perform the commands that you specify: | ||
− | |||
− | |||
SendMessage(mHwnd, WM_MCOMMAND, cMethod, cIndex) | SendMessage(mHwnd, WM_MCOMMAND, cMethod, cIndex) | ||
Line 40: | Line 38: | ||
* '''WM_MCOMMAND''' - Which should be defined as WM_USER + 200 | * '''WM_MCOMMAND''' - Which should be defined as WM_USER + 200 | ||
* '''cMethod''' - How mIRC should process the message, where: | * '''cMethod''' - How mIRC should process the message, where: | ||
− | ** 1 = As if typed in editbox (default) | + | ** 1 = As if typed in editbox (default) |
** 2 = As if typed in editbox, send as plain text | ** 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, and 8 | ** 4 = Use flood protection if turned on, can be or'd with 1 or 2, and 8 | ||
Line 98: | Line 96: | ||
#include <stdio.h> | #include <stdio.h> | ||
#include <windows.h> | #include <windows.h> | ||
+ | //#pragma warning(disable : 4996) | ||
#define WM_MCOMMAND WM_USER + 200 | #define WM_MCOMMAND WM_USER + 200 | ||
#define WM_MEVALUATE WM_USER + 201 | #define WM_MEVALUATE WM_USER + 201 | ||
Line 123: | Line 122: | ||
} | } | ||
</source> | </source> | ||
− | You must pass the handle of | + | You must pass the handle of a valid channel, query etc window as the first parameter of the program in the command line for it to work and receive the echo. |
[[Category:mIRC|sendmessage]] | [[Category:mIRC|sendmessage]] | ||
[[Category:interprocess communication]] | [[Category:interprocess communication]] |