[PA] 업무자동화/[AH]Autohotkey
AH retrieve language setting 언어설정 찾기
Weneedu
2021. 10. 8. 11:03
20211007 2200
REF
[1] IME Status in the web browesr, "https://www.autohotkey.com/boards/viewtopic.php?t=14962"
keyword; 한영, 영어, 한글, 키보드
;==============================================================
; Function Defined
;==============================================================
IME_CHECK(WinTitle)
{
WinGet,hWnd,ID,%WinTitle%
Return Send_ImeControl(ImmGetDefaultIMEWnd(hWnd),0x005,"")
}
Send_ImeControl(DefaultIMEWnd, wParam, lParam)
{
DetectSave := A_DetectHiddenWindows
DetectHiddenWindows,ON
SendMessage 0x283, wParam,lParam,,ahk_id %DefaultIMEWnd%
if (DetectSave <> A_DetectHiddenWindows)
DetectHiddenWindows,%DetectSave%
return ErrorLevel
}
ImmGetDefaultIMEWnd(hWnd)
{
return DllCall("imm32\ImmGetDefaultIMEWnd", Uint,hWnd, Uint)
}
;==============================================================
WinGetActiveTitle, A
ime := % IME_CHECK("A")
if (ime="0") ;if Englis
MsgBox, "English" ;send, {vk15sc138}
if(ime="1")
MsgBox, "Korean"
ExitApp