Code: Select all
setTitleMatchMode,2
F1::
if(WinActive("ahk_exe SLDWORKS.exe"))
Send {f1}
else
SendInput ^+{tab}
return
F2::
if(WinActive("ahk_exe SLDWORKS.exe") or WinActive("ahk_exe explorer.exe"))
Send {f2}
else
SendInput ^{tab}
return