This is an unresolved problem. How can I use a shell command with MC 64. The indicator use to work with MC32. Now it cause an error to my indicator.
Function to open a text file from the Name string it received
Martin
Code: Select all
//OpenNotesFile will open a text file to write notes
Input: FileName (stringsimple);
var:
intrabarpersist Path_and_FileName ("");
Once Path_And_Filename = ("G:\Users\Utilisateur\Documents\Bourse\Text_On_Chart\" + FileName + ".txt");
//print (Path_and_FileName);
//File_Name = "G:\Users\Utilisateur\Documents\Bourse\Text_On_Chart\EUR.JPY_Chart_3.txt";
iF ELC.PathExists(Path_and_FileName) then begin
//iF ELC.PathExists(FileName) then begin
Print("test Exist Filename " + Path_and_FileName);
shellexecute("open",path_and_FileName);
end
else begin
Print("test Filename " + Path_and_FileName);
FileAppend(Path_and_FileName,"Note for: " + filename + NEWLINE +">" + NEWLINE + ">");
shellexecute("open",text(path_and_FileName));
end;