shablon





//+------------------------------------------------------------------+
//|                                                      shablon.mq4 |
//|                                             Viatcheslav Suvorov  |
//+------------------------------------------------------------------+
#property copyright "Viatcheslav Suvorov"
#property show_inputs
#include <WinUser32.mqh>

#import "IdleLib.dll"
int GetLastKeyWP();
int GetLastMouseWP();
int IdleLibInit();
int IdleLibUnInit();
string GetActiveWndName();
#import

int start()
  {
        IdleLibInit();//èíèöèàëèçèðóåì Dll äëÿ ïåðåõâàòà ñîáûòèé   
         bool NeedLoop=true;  
         while(NeedLoop){           
           int lastkey=GetLastKeyWP();//Îïðàøèâàåì êîä ïîñë. êëàâèøè
           int lastmouse=GetLastMouseWP();//Îïðàøèâàåì êîä ìûøè           
           string lastwnd=GetActiveWndName();//Èìÿ îêíà Metatrader ãäå ïðîèçîøëî ñîáûòèå
           if ((lastkey!=0) && (lastwnd!="")) {             
             Print("Êîä íàæàòîé êëàâèøè=",lastkey," èç îêíà ",lastwnd);
           }  
           if ((lastmouse!=0) && (lastwnd!="") && (lastmouse!=512)) {//îòðàæàåì âñå ñîáûòèÿ êðîìå äâèæåíèÿ ìûøè             
             Print("Êîä ìûøè=",lastmouse," èç îêíà ",lastwnd);
           }                                    
           Sleep(100);
         }//while                
   return(0);
  }

void deinit()
  {
   IdleLibUnInit();
  }





Sample





Analysis



Market Information Used:



Indicator Curves created:


Indicators Used:



Custom Indicators Used:
IdleLib

Order Management characteristics:

Other Features: