--- In [email protected], "swzoh" <[EMAIL PROTECTED]> wrote:
>
> 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
>


Hi. Sean..

Thanks.. 

Your script work well.. 
toggle, first - korean, second - english, third - korean.... 


BTW..
For example..

win.keys("thank you")
in englisth mode
"thank you"
but, korean mode
"¼Ò¹«¤¿ ¤Ë¤À¤Å"

So, 

if (Enlishi_mode = 1 ) do
win.keys("thank you")
endif

------------------
Recentrly script is

Local dll_status 
Local hWnd, hIME 
Local bRes 
hWnd = Win.Handle("Active") 
hIME = dll.call("imm32|ImmGetDefaultIMEWnd|ui",hWnd) 
bRes = Win.SendMessage(hIME, 0x283, 0x005, 0) 
;; 1 - korean mode 
;; 0 - english mode 
if (bres != 0) do 
keytrap.sendkeys(242,21,0) ;; keydown 
keytrap.sendkeys(242,21,1) ;; keyup 
endif 

*Keys G:\upload_image\image01.jpg 
*Keys {tab}{tab} 
*Keys G:\upload_image\image02.jpg 
*Keys {tab}{tab} 

KeyTrap.ResetKeys() 
Quit 
-------------------------------------------------

Thanks.. 
Regards..










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