Autohotkey 仅提供特定语言的更改
Autohotkey give a change only in specific language
#If !(langID = "EN")
:?:ign::ing
#If
我尝试使用 AutoHotKey 制作英语过滤器,但不适用于其他语言。
我测试显示 LangID = 0x0409
/ langID = 0000409
但没有用,如何让它工作?
尝试
#If !(GetKeyboardLanguage(WinActive("A")) = 0x0409) ; English ; "!" means "NOT"
:?:ign::ing
#If
GetKeyboardLanguage(_hWnd=0){
if !_hWnd
ThreadId=0
else
if !ThreadId := DllCall("user32.dll\GetWindowThreadProcessId", "Ptr", _hWnd, "UInt", 0, "UInt")
return false
if !KBLayout := DllCall("user32.dll\GetKeyboardLayout", "UInt", ThreadId, "UInt")
return false
return KBLayout & 0xFFFF
}
https://autohotkey.com/board/topic/116538-detect-which-language-is-currently-on/#entry672236
#If !(langID = "EN")
:?:ign::ing
#If
我尝试使用 AutoHotKey 制作英语过滤器,但不适用于其他语言。
我测试显示 LangID = 0x0409
/ langID = 0000409
但没有用,如何让它工作?
尝试
#If !(GetKeyboardLanguage(WinActive("A")) = 0x0409) ; English ; "!" means "NOT"
:?:ign::ing
#If
GetKeyboardLanguage(_hWnd=0){
if !_hWnd
ThreadId=0
else
if !ThreadId := DllCall("user32.dll\GetWindowThreadProcessId", "Ptr", _hWnd, "UInt", 0, "UInt")
return false
if !KBLayout := DllCall("user32.dll\GetKeyboardLayout", "UInt", ThreadId, "UInt")
return false
return KBLayout & 0xFFFF
}
https://autohotkey.com/board/topic/116538-detect-which-language-is-currently-on/#entry672236