This is a good reference for PostMessage stuff
https://www.mql5.com/en/forum/124688
but doesn't seem to have what you need on casual inspection.
This is a good reference for PostMessage stuff
https://www.mql5.com/en/forum/124688
but doesn't seem to have what you need on casual inspection.
hello;
thank you dabbler
but it is not WM_COMMAND ; you can use WM_COMMAND with 65280 - 65281 - 65282 - 65283 ....... but i need to know MAX of chart windows
Looks like you need
https://www.mql5.com/en/forum/110904
specifically the keybd_event function.
thank you dabbler ;
keybd_event can not help me i want to work by Handle ;
thank you dabbler ;
keybd_event can not help me i want to work by Handle ;
Pity, because this handy little script that I just wrote and tested seemed to do what you asked for in your original post :-(
#include <WinUser32.mqh> // This script cycles between open chart windows using a CTRL+F6 keypress int start(){ for( int n=1; n<20; n++ ){ Comment(n); keybd_event(17,0,0,0); // 17=Ctrl Sleep(10); keybd_event(117,0,0,0); // 117= F6 Sleep(10); keybd_event(117,0,KEYEVENTF_KEYUP,0); Sleep(10); keybd_event(17,0,KEYEVENTF_KEYUP,0); Sleep(2000); } Comment(""); }
My script does the same thing and has the same problem! (as noted in the referenced old post.) You have to catch whichever chart the script is running in and kill the script on that chart. Sounds like it needs a GlobalVariable as a flag to stop the script. Then a new Kill script can set the Global to a Kill value to kill off the slideshow script. The OP is only running once a minute, but at say 5 seconds per chart it could get a bit difficult to stop!
thank you very much for your idea

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
i want to program an EA this EA switch to the next chart window each minute
we can switch to the next chart window by CTRL +F6 or CTRL+TAB
i need your help please;
how can i program this by SendMessageA ? or other method
please example
thank you