MQL4 - automated forex trading   /  

Forum

Execute an exe file (please help)

Back to topics list To post a new topic, please log in or register

avatar
4
quantem 2008.10.10 20:00 
Hi,

I want to do a simple thing (so I thought). I want to simply open (launch) an external program from an EA. (not in the EA)

So just for exampe purposes. Let us say I wanted to open Microsoft word when a certain thing happens in the EA.

I have doen this before but I cannot find the script, I have spent 2 hours searching the web. Next time I will save the code somewhere safe!
article

Running MetaTrader 4 Client Terminal on Linux-Desktop

Description of a step-by-step Linux-desktop setup using a non-emulator wine for running MetaTrader 4 Client Terminal on it.


avatar
14
yewnix 2008.10.10 23:20 
#import "shell32.dll"
int ShellExecuteA(int hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd);

#import


init()

{

return(0);

}


start()

{

// when your thing happens.....

ShellExecuteA(NULL, "open", "notepad.exe", "", "", 3);


return(0);

}


deinit()

{

return(0);

}


/// for more information about arguments etc.. please see http://support.microsoft.com/kb/238245




Back to topics list  

To add comments, please log in or register