HotIfWinActive - unhandled exception
Issue #100
closed
Code:
HotIfWinActive("ahk_class Notepad")
Hotkey("^!e", "MyFuncForNotepad") ; Creates a hotkey that works only in Notepad.
MyFuncForNotepad() {
MsgBox("Hotkey works", "Test of HotIfWinActive")
}
Error message:
Message: Unable to find existing hotkey handler: MyFuncForNotepad
What: Keysharp.Core.Keyboard.Hotkey()
Analogous working AHK code:
HotIfWinActive("ahk_class Notepad")
Hotkey("^!e", MyFuncForNotepad) ; Creates a hotkey that works only in Notepad.
MyFuncForNotepad(*) {
MsgBox("Hotkey works", "Test of HotIfWinActive")
}
Comments (3)
-
repo owner -
reporter - changed status to resolved
Working, thanks! Resolved.
-
reporter - changed status to closed
- Log in to comment
I’ve committed a fix for Hotkey() and Hotstring(), please test.