mIRC Homepage
Posted By: Wims A command for Tool > Log files - 31/05/14 05:08 PM
I would like to see a command to open that dialog, it can be tricky to workaround it with Sendkey currently because of the weird behavior of the menubar and the alt key.

Maybe just a new switch, -o, to /logview:

/logview <filename> opens the text file
/logview -o opens the dialog
Posted By: westor Re: A command for Tool > Log files - 31/05/14 08:45 PM
Nice idea +1
Posted By: HadS Re: A command for Tool > Log files - 12/06/14 01:35 PM
Good idea.

However, it's currently possible to do that quite easily by using the "SendMessage" function of the Win32 API. This function can be implemented on mIRC only trough $com or $dll.

Long time ago, elizio founds a way to executes several "mIRC item-menu's command" with cwnd.dll trough sendMessage function(post of elizio: archived reference here ).

So, to open the log dialog: //dll cwnd.dll sendMessage $window(-2).hwnd 273 155 0

edit: the most correct way to do that is to uses PostMessage instead of SendMessage. SendMessage waits and returns once the dialog closed.

For a custom $dll, here is the correct function (in C):

int __stdcall openlogdialog(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) {
if (!nopause) {
PostMessage(mWnd, WM_COMMAND, 155, 0);
lstrcpyA(data, "$true");
}
else {
lstrcpyA(data, "$false");
}
return 3;
}

call with /dll myowncompiled.dll openlogdialog
Posted By: Wims Re: A command for Tool > Log files - 12/06/14 09:24 PM
That's nice but I made that suggestion for someone else laugh
I think this is something mIRC should have regardless
© mIRC Discussion Forums