jenney.qiu

导航

autoit 将输入法修改为英文输入法

如果能用ControlSend,就不推荐用send,如果非要用send,可以切换输入法为英文再send.

$hWnd = WinGetHandle("[ACTIVE]");$hWnd 为目标窗口句柄,这里设置的是当前活动窗口
$ret = DllCall("user32.dll", "long", "LoadKeyboardLayout", "str", "08040804", "int", 1 + 0)
DllCall("user32.dll", "ptr", "SendMessage", "hwnd", $hWnd, "int", 0x50, "int", 1, "int", $ret[0])        
Send('nh')

 

 

posted on 2015-05-25 15:17  jenney.qiu  阅读(2039)  评论(0编辑  收藏  举报