Using identical hotkeys for different windows does work when I save the script as different files, but this is ineffective as I would have to save multiple files. I want one file, same hotkeys but different functions for each window.
The script I'm using now have been revised many times, and I have tried different methods but none work. The problem is that the script works just as it would without it. My latest version is below.
For instance, the hotkeys in sublime text also work in explorer.exe, while I only want it to work in sublime text.
Code: Select all
#If WinActive ("ahk_exe sublime_text.exe")
ins::{
home::}
#If WinActive("ahk_exe Explorer.EXE")
!1::send, {enter}
!2::SendInput, {f2}
!3::SendInput, !{left}
f1::send, {enter}
#If WinActive("ahk_exe dopus.exe")
!1::send, {enter}
!2::SendInput, !{left}
!3::SendInput, !{right}
f1::send, {enter}
#If WinActive("ahk_exe Everything.exe")
!1::send, {enter}
f1::send, {enter}
\:: Send, {down}
]::Send, {up}
#If