AutoHotkey Beginner Tutorial包括一個sample script來演示窗口特定的熱鍵和熱點。ahk_class是什麼?我怎樣才能將它用於窗口匹配?
#IfWinActive ahk_class Notepad
::msg::You typed msg in Notepad
#IfWinActive
#IfWinActive untitled - Paint
::msg::You typed msg in MSPaint!
#IfWinActive
第二個例子非常明瞭:檢查名爲「untitled - Paint」的窗口。這是第一個使用ahk_class
的例子,讓我感到困惑。
我還沒有找到AHK documentation中的變量的任何解釋。 According to an AHK forum post,ahk_class
是Windows Spy給出的窗口的名稱,該帖子沒有詳細介紹。
使用ahk_class Notepad
和Untitled - Notepad
會有什麼區別嗎?如果替換爲#IfWinActive ahk_class Paint
,第二個示例是否可以工作?
ahk_class
什麼是ahk_class
?我怎樣才能將它用於窗口匹配?
附加說明:我正在使用AutoHotkey的便攜版本,[它不包含WindowSpy](https://stackoverflow.com/questions/45552452/could-not-launch-file-au3-spy-exe) 。 –