Play videoPlease edit your post.
For large amounts of code, attach it.
int r=ShellExecuteA(0, "Open"
Since February 3, 2014 (Build 600) All strings are Unicode.- ForexTaurus: Has anyone come across this?Six days ago: Unable to run batch file - MQL4 forum
.

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
I am able to run a batch file from the command prompt just fine BUT when I try and run from Metatrader I get Error 2 Code.
MQL4 Script:
#import "shell32.dll"
int ShellExecuteA(int hWnd, string Verb, string File, string Parameter, string Path, int ShowCommand);
#import int r=ShellExecuteA(0, "Open", "C:\Users\Administrator\Tools\send.bat", "", "", 1);
if (r <= 32){ Alert("Shell failed: ", r); return(false); }
Like I said, running the .bat file or using command prompt, just fine. MQL4 Script does not. I have tried various variations of the above, like "Run" instead of "Open", cmd.com, etc. same error 2.
Has anyone come across this?