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
'[PA] 업무자동화 > [AH]Autohotkey' 카테고리의 다른 글
AH If 를 한 줄에 one line if statement - Ternary (0) | 2021.10.23 |
---|---|
AH Checkbox 인수의 이해 (0) | 2021.10.15 |
AH close GUI with ESC key (0) | 2021.09.24 |
AH 특수문자 자동입력 안된다 ★ (0) | 2021.08.26 |
AH Using JavaScript in AHK script (0) | 2021.03.05 |