Is there a way to run an external EXE from MQ4, similar to the system( ) or shell( ) command?
- MQL4: How to get Windows XP/Vista/7/2003Srv/2008Srv serial number?
- running external program
- last commend hotkey?
Thanks.
I get a compile error: 'ShellExecute' - function is not defined. I do have #import "Shell32.dll" at the top of the file.
Any thoughts? Also, can you provide an example of a ShellExecute( ) from MQ4?
Thanks again!
Alan
I get a compile error: 'ShellExecute' - function is not defined. I do have #import "Shell32.dll" at the top of the file.
Any thoughts? Also, can you provide an example of a ShellExecute( ) from MQ4?
Thanks again!
Alan
Please notice "<,>" brackets, try it like this #import <Shell32.dll>.
Thanks.
I get a compile error: 'ShellExecute' - function is not defined. I do have #import "Shell32.dll" at the top of the file.
Any thoughts? Also, can you provide an example of a ShellExecute( ) from MQ4?
Thanks again!
Alan
I get a compile error: 'ShellExecute' - function is not defined. I do have #import "Shell32.dll" at the top of the file.
Any thoughts? Also, can you provide an example of a ShellExecute( ) from MQ4?
Thanks again!
Alan
Please notice "<,>" brackets, try it like this #import <Shell32.dll>.
#inport <Shell32.dll> gives a compile error. #import "Shell32.dll" does not, but then I get the "function not defined" error.
Help?! Anyone have an example of ShellExecute( )'s use in MQ4?
Alan
Alan,
Look at this simple script. Read comments attentively.
Look at this simple script. Read comments attentively.
//+------------------------------------------------------------------+ //| ShellExecuteTest.mq4 | //| Copyright © 2006, MetaQuotes Software Corp. | //| https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mt5setup.exe?utm_campaign=MQL5.community",0,0,SW_SHOW); //---- return(0); } //+------------------------------------------------------------------+
It really works!
Thanks very much! It's working.
And now for the natural next question - how to cause the parent process to wait for the child to finish? My research indicates that you need to use CreateProcessA, WaitForSingleObject, and CloseHandle.
Does anyone have examples of the use of these API calls from MQ4? I got the #import "kernel32.dll" working, and even the function definitions, but it looks like I need to pass a struct by reference and I'm not sure MQ4 handles that.
Thanks again,
Alan
And now for the natural next question - how to cause the parent process to wait for the child to finish? My research indicates that you need to use CreateProcessA, WaitForSingleObject, and CloseHandle.
Does anyone have examples of the use of these API calls from MQ4? I got the #import "kernel32.dll" working, and even the function definitions, but it looks like I need to pass a struct by reference and I'm not sure MQ4 handles that.
Thanks again,
Alan
Thanks, Arthur.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register