Download MetaTrader 5
To add comments, please log in or register
Have you developed a profitable strategy? Share it with millions of traders via Signals!
Soumyadeep
19
Soumyadeep 2016.01.14 10:09 

Hi guys,

 

My shellexecute is calling a python class which would return some value.

How can I get this value?

Here is what I am doing but its only returning 42.Any amount of help would be great.

 

#import "shell32.dll"
string ShellExecuteW(
    int hwnd,
    string Operation,
    string File,
    string Parameters,
    string Directory,
    int ShowCmd
);
int OnInit()
  {
string strUrl="sample.py";
string directory="C:\\Desktop\\python\\";
string value= Shell32::ShellExecuteW(0, "open", strUrl, "1 2", directory, 1);
Alert(value);
return 1;
  }
Carl Schreiber
5927
Carl Schreiber 2016.01.14 12:27  

a ) create a local web-site and read it from there,

b) save it to a local file and read the file - but you have to wait (Sleep) until ShellExecute has finished!

/
To add comments, please log in or register