Messtone LLC

VSCode&MQL Coding Trade Compilemql.ahk;Check that one argument was passed to the script ifA_Args.Length( )<1{MsgBox % "This script requires 1 parameter" ExitApp}; first argument should be the mql file with path which should be compiled filenameMesstone:=A_Args[1];Start the Metaeditor or bring it to front if already running and open and focus to the file given in the argument 1 Run, "C:\Program Files\<Path to the MetaTrader\metaeditor64.exe"%filenameMesstone%;Wait until MetaEditor window is active SetTitleMatchMode,2 WinWaitActive, MetaEditor, ,3; MetaEditor is now open and active,so we can send it commands;Send F7 key to initiate complication of passed mql file Send{F7};Wait a bit Sleep 100;Send F4 key to switch to Metatrader Send{F4} MetaTraderSwitcher.ahk

Leave a comment