mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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

Last edited by Wims; 31/05/14 05:37 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Nice idea +1


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jul 2003
Posts: 40
H
Ameglian cow
Offline
Ameglian cow
H
Joined: Jul 2003
Posts: 40
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

Last edited by HadS; 12/06/14 02:09 PM.
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
That's nice but I made that suggestion for someone else laugh
I think this is something mIRC should have regardless


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard