Ime_Check(WinTitle) { ; 0이면 영어, 1이면 한글
WinGet, hwnd, ID, % WinTitle
a := DllCall("imm32\ImmGetDefaultIMEWnd", Uint, hwnd, Uint)
Return b(a, 0x005, "")
}
b(DefaultIMEWnd, wParam, lParam) {
dh := A_DetectHiddenWindows
DetectHiddenWindows, ON
SendMessage 0x283, wParam, lParam,, % "ahk_id" DefaultIMEWnd
if (dh <> A_DetectHiddenWindows)
DetectHiddenWindows, % dh
return ErrorLevel
}
Send, % (!Ime_Check("A")? "{vk15sc1F2}":"")