How to launch a macro file from an EA

 

Hello guys,

I recorded a macro file to send me a message via Skype when a signal occurs. But I have a problem with launching the macro file from my EA.

How about this:

if(LongSignal) FileOpen("MyMacroFile.msd",FILE_READ);

Is this the right way to launch the file? Please help. Thanks.

 

Use WinAPI http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx

 
#import  "shell32.dll"                                                         
  int ShellExecuteA(int hwnd,string Operation,string File,string Parameters,string Directory,int ShowCmd); 
#import
 

Ok, I added these lines to the header. Now I am trying to execute the function.

if(LongSignal) int alert=ShellExecuteA(NULL,"open","LongSig.msd",NULL,NULL,"SW_SHOW");

It is still not working.

Do I have to save a copy of shell32.dll in the experts/files folder?

Reason: