MetaTraderSwitcher.ahk#SingleInstance Force SendMode Input SetWorkingDir,%A_ScriptDir%;define how we identify the metatrader and vscode exe files metatrader:="ahk_exe termina64.exe" VSCode:="ahk_exe Cod.exe";Bind F4 key to MetaTrader and call "SwitchToVsCode"when pressed Hotkey,IfWinActive,%MetaTrader% Hotkey,F4, SwitchToVsCode;Bind F4 key to VSCode and call "SwitchToMetaTrader"when pressed Hotkey,IfWinActive,%vscode% Hotkey,F4,SwitchToMetaTrader return SwitchToVsCode:;check if MetaTrade window is active and VSCode exists then switch window to VSCode IfWinActive,%metatrader% IfWinExist,%vscode% WinActivate,%vscode% return SwitchToMetaTradder:;check if VSCode window is active and MetaTrader exists then switch window to MetaTrader IfWinActive,%vscode% IfWinExist,%metatrader% WinActivate,%metatrader% return Messtone Autohotkey Program download this URL`https://www.autohotkey.com/ {"label“:”Compile-and- Switch”,”type”:”shell”,”command’:”C\<path to MQL5 directory>\\MQL5\\ CompileMql.exe C:\\<path to MQL5 directory>\\MQL5/EA>.mq5″,”presentation”:{“echo”:true,”reveal”:”always”,”focus”:false,”panel”:”shared”,”showReuseMessage”:false}},{“key”:”f7″,”command”:”workbench.action.tasks.runTask”,”args”:”Compile-and-Switch”},
Leave a comment