/* * ShowWindow() Commands */ #define SW_HIDE 0 #define SW_SHOWNORMAL 1 #define SW_NORMAL 1 #define SW_SHOWMINIMIZED 2 #define SW_SHOWMAXIMIZED 3 #define SW_MAXIMIZE 3 #define SW_SHOWNOACTIVATE 4 #define SW_SHOW 5 #define SW_MINIMIZE 6 #define SW_SHOWMINNOACTIVE 7 #define SW_SHOWNA 8 #define SW_RESTORE 9 #define SW_SHOWDEFAULT 10 #define SW_FORCEMINIMIZE 11 #define SW_MAX 11
Thank you - it works now
can somebody show the right code because i dont get what you mean by unicode...
and i cant find any example of this situation in help.
thank you
can somebody show the right code because i dont get what you mean by unicode...
and i cant find any example of this situation in help.
thank you
Here it is :
#property copyright "2009, MetaQuotes Software Corp."
#property link "http://www.mql5.com"
#property version "1.00"
#import "shell32.dll"
int ShellExecuteW(int hWnd,int lpVerb,string lpFile,string lpParameters,string lpDirectory,int nCmdShow);
#import
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart() // or OnTick() or OnCalculate(..)
{
ShellExecuteW(0,0,"notepad.exe","","c:\\windows\\system32\\",1);
}
//+------------------------------------------------------------------+
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
In MT4 this worked OK:
#import "shell32.dll"
int ShellExecuteA(int hWnd,int lpVerb,string lpFile,string lpParameters,int lpDirectory,int nCmdShow);
#import
void OnTick()
{
ShellExecuteA (0,0,"Notepad.exe","",0,SW_SHOW);
}
When debugging it goes through the ShellExecute command with no error message but I don't get Notepad come up
-Jerry