We're having tropical nights here, so I got insomnia last night, and
this thread caught my attention again. The following didn't work for
other apps' windows as it is now, since Windows prohibits to get/set
the input context of other thread.
 
> --------------------------------------------------------------------
> local hWnd,hIMC,dwConv,dwSent
> 
> hWnd=win.handle("active")
> hIMC=dll.call("imm32|ImmGetContext|ui",hWnd)
> 
> dll.call("imm32|ImmGetConversionStatus|ui ui* ui*
> b",hIMC,"dwConv","dwSent")
> dll.call("imm32|ImmSetConversionStatus|ui ui ui",hIMC,dwConv ^
> 1,dwSent) ;; toggle
> ;dll.call("imm32|ImmSetConversionStatus|ui ui ui",hIMC,dwConv |
> 1,dwSent) ;; on
> ;dll.call("imm32|ImmSetConversionStatus|ui ui ui",hIMC,dwConv &
> ~1,dwSent) ;; off
> dll.call("imm32|ImmReleaseContext|ui ui",hWnd,hIMC)
> quit
> --------------------------------------------------------------------

Then, I just did a little study about it and came up with the
following which works fine with other thread's windows too as it
doesn't require the input context. I hope some users find it helpful:

----------------------------------------------------------------------
local hWIme=dll.call("imm32|ImmGetDefaultIMEWnd|ui",;;+
Win.Handle("active"))
hWIme.SendMessage(0x283,2,hWIme.SendMessage(0x283,1,0) ^ 1)
quit
----------------------------------------------------------------------

Sean






Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to