had to put the keybd_event(13, 0, 0, 0); before the SendMessageW(hWnd, MessageNumber, 15, name2)
otherwise it did not work ... instead it left dialog open and then opened the pair input box at base of chart.
MM
I tried your method without any success. I'm trying to place an indicator from within a script. I can't use PostMessageW either because it crashes my MT4 terminal. But there's no way to close the indicator config dialog box if I use SendMessageW to place the indicator. I think this is because, according to the Windows MDSN documentation, " The SendMessagefunction calls the window procedure for
the specified window and does not return until the window procedure has
processed the message." This means that it won't allow a keyboard event to be handled until the dialog box is removed.
Is there any way to close the config dialog box which is compatible with the lastest build of MT4? Is there an alternative to using PostMessageW and SendMessageW?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
}
Does not work at all.
Does not work at all.
Please look at this topic here, it might help you.
Thanks for the help.
Works now BUT ....
had to put the keybd_event(13, 0, 0, 0); before the SendMessageW(hWnd, MessageNumber, 15, name2)
otherwise it did not work ... instead it left dialog open and then opened the pair input box at base of chart.
MM
I tried your method without any success. I'm trying to place an indicator from within a script. I can't use PostMessageW either because it crashes my MT4 terminal. But there's no way to close the indicator config dialog box if I use SendMessageW to place the indicator. I think this is because, according to the Windows MDSN documentation, " The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message." This means that it won't allow a keyboard event to be handled until the dialog box is removed.
Is there any way to close the config dialog box which is compatible with the lastest build of MT4? Is there an alternative to using PostMessageW and SendMessageW?