ll_libload imm, "imm32.dll"
ll_getproc ImmGetContext, "ImmGetContext", imm
ll_getproc ImmGetOpenStatus, "ImmGetOpenStatus", imm
ll_getproc ImmReleaseContext, "ImmReleaseContext", imm
#module
#deffunc initime
mref bmscr, 67
ll_callfunc bmscr.13, 1, ImmGetContext@ : ll_ret himc
return himc
#deffunc exitime onexit
if himc {
mref bmscr, 67
prm = bmscr.13, himc
ll_callfunc prm, 2, ImmReleaseContext@
}
return
#deffunc getimestat
mref stt, 64
ll_callfunc himc, 1, ImmGetOpenStatus@ : ll_ret prm : stt = prm
return
#global
initime
sdim buf, 32
input buf, 100
sdim mode, 16, 2
mode = "開いていません", "開いています"
repeat
getimestat
title "現在IMEを" + mode.stat
wait 10
loop
|