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 94: Line 94:
 
1 alone means that a script error occured, 16 and 32 can only happen if you use $eventid in SendMessage() in the context of a remote event but the script from which it was called no longer exist.
 
1 alone means that a script error occured, 16 and 32 can only happen if you use $eventid in SendMessage() in the context of a remote event but the script from which it was called no longer exist.
  
= Examples =
+
Hi, I found your beautiful site on Facebook and noticed that you haven't implemented Server Side Tracking (SST) for Google Tag Manager (GTM). Due to the upcoming requirement of Google Analytics 4, it is necessary to implement SST in your GTM on every website.
<source lang="c">
 
#include <stdio.h>
 
#include <windows.h>
 
#define WM_MCOMMAND WM_USER + 200
 
#define WM_MEVALUATE WM_USER + 201
 
HANDLE file;
 
LPSTR str;
 
  
int main(int argc, char * argv[])
+
SST can help you avoid data loss, protect your user's privacy, and improve website performance. It can also help you with data processing, including cross-domain tracking and handling ad-blocker restrictions.
{
+
 
char* command = "//echo -a Hello world";
+
I am writing to offer my assistance in implementing the SST function for GTM on your website. I have experience in working with GTM and can help you set up the SST function efficiently.
char* evaluation = "m $+ $upper(irc)";
+
 
file = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, L"mIRC");
+
Let me know if you are interested in help with this service, and I will be happy to discuss further. Thank you for considering my proposal.
if (file == NULL)
+
 
exit(0);
+
Best regards,
str = (LPSTR)MapViewOfFile(file, FILE_MAP_ALL_ACCESS, 0, 0, 0);
+
Joe Walker GTM
if (str == NULL)
+
sst.google.manager@outlook.com
exit(0);
 
HWND mhwnd = (HWND)atoi(argv[1]);
 
//send //echo -s Hello world to mIRC
 
strcpy_s(str, 4096, command);
 
SendMessage(mhwnd, WM_MCOMMAND, 1, 0);
 
//Ask mIRC to evaluate and send back the result
 
strcpy_s(str, 4096, evaluation);
 
SendMessage(mhwnd, WM_MEVALUATE, 0, 0);
 
printf("%s", str);
 
}
 
</source>
 
You must pass the handle of the main mIRC window or a valid channel, query etc window as the first parameter of the program in the command line for it to work.
 
[[Category:mIRC|sendmessage]]
 
[[Category:interprocess communication]]
 

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)