Alternative method to mimick CTRL+F5 keyboard shortcut:
#include <WinUser32.mqh> #import "user32.dll" void keybd_event(int bVk,int bScan,int dwFlags,int dwExtraInfo); #define VK_SHIFT 16 //SHIFT key #define VK_CONTROL 17 //CTRL key #define VK_F5 116 //F5 key int start() { keybd_event(VK_CONTROL,0,0,0); keybd_event(VK_F5,0,0,0); keybd_event(VK_F5,0,KEYEVENTF_KEYUP,0); keybd_event(VK_CONTROL,0,KEYEVENTF_KEYUP,0); }
come on...
What do you mean?
The wParam for Next Profile is 33152 and Previous Profile is 35465
Only use 34100 if you know the position of the profile you want to change to ... 34100 is first profile, 34101 is second, 34102 is third, and so on ...
You could iterate through the profiles, but you should find the menu count first and keep in mind to disregard the first 4 items. Easier to just use one of the above two codes for next and previous.
I'm trying to find a way to automate my ctrl f5 key
I was reading these posts. Can anyone tell me if Paul's post can do that?
Is his post an ea or script?
Is there a place on this site that I can post what I need programmed and get some kind of quotes to have it done?
Thanks for any guidance
Rick

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
PostMessageA(hndl, WM_COMMAND, 34100, 0); // for the first profile
it is supposed to change profiles. I have been able to get every other wm command to work, and the only code that changes is what you see
above. I have tried in multiple mt4 clients and on different machines.
is there a different function I should be using? is PostMessageA correct?
Having the ability to change the profiles on a vps is a great tool, and it can allow you to run many indicators, and simply change the profiles
every minute or so to rotate through them all.