it must work, but it isn't
#import "shell32.dll" int ShellExecute(int hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd); #import int init() { ShellExecute(NULL, "open", "C:\\Windows\\Notepad.exe", NULL, NULL, 10); return (0); }
Instead of opening notepad, request to open a file associated with notepad:
Example from a working script:
string theFile = path+"\\experts\\files\\reports\\MarketInfo_"+AccountCompany()+"_.txt";
ShellExecuteA(0, "open", theFile, NULL, NULL, 1);
yes, the problem was in ShellExecute(), it takes unicode strings.. ShellExecuteA() is true variant.
HI ~~~everybody~~~
help ~~~
dll lib must be in system32 folder ???
Instead of opening notepad, request to open a file associated with notepad:
Example from a working script:
string theFile = path+"\\experts\\files\\reports\\MarketInfo_"+AccountCompany()+"_.txt";
ShellExecuteA(0, "open", theFile, NULL, NULL, 1);
Hello,
It seems very good. But still not working. Could you give the whole script. Maybe it could help.
For example the "path" variable not definied.
Thanks a lot for your help.
string path = TerminalPath();
...
That is just an example... assign theFile with a string that represents the full path of the file you want to open, not my file, which doesn't exist on your machine.
Which error?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
how can i use mql to run extern ".exe" program?
thanks everyone