Code: Select all
HotIfWinActive
hotkey("F9", (p*)=>msgbox(11), "on")
delete HotIfWinActive and worked well
Code: Select all
HotIfWinActive
hotkey("F9", (p*)=>msgbox(11), "on")
Never used v2 before, but a quick search for "ahk HotIfWinActive" shows nothing.hyaray wrote: ↑18 Oct 2021, 00:17F9 not workedCode: Select all
HotIfWinActive hotkey("F9", (p*)=>msgbox(11), "on")
delete HotIfWinActive and worked well
Code: Select all
; needn't to define function
#hotif WinActive("ahk_class Notepad")
F9::{
msgbox(11)
;multi lines of code
}
Code: Select all
HotIfWinActive("ahk_class Notepad")
hotkey("F9", (p*)=>msgbox(11), "on") ;fits for simple code for func object, looks better
Users browsing this forum: CraigM, downstairs and 32 guests