I wanted to use the F1 key for a hot key function when Firefox was active. However, if the Firefox was not active, I would like it to be the Help function as it normally is in Windows. I wrote the following:
Code: Select all
F1:: ; Cycle Bitwarden Login
If WinActive("ahk_exe firefox.exe")
Send "Command"
return
If not WinActive("ahk_exe firefox.exe")
return
return