프로그래밍/오토핫키

IME Check

포스몬 2018. 8. 12. 16:05




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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) 
 
}
 

cs




1
2
3
4
5
6
7
8
9
10
11
12
13
14
WinGetActiveTitle, ExplorerTitle 
 
ime_status := % IME_CHECK("A"
 
if (ime_status = "1"

Send, {vk15sc138}
 
}

cs