返回列表 发帖
Global  Const  $KeyboardLayouts="E0200804",$var1 = "E0230804"
DllCall("user32.dll","int","UnloadKeyboardLayout","long",$var1)
DllCall("user32.dll","int","UnloadKeyboardLayout","long",$KeyboardLayouts)
;清除某输入法布局

RegWrite("HKEY_CURRENT_USER\Keyboard Layout\Preload","3","REG_SZ","e0230804")
RegWrite("HKEY_CURRENT_USER\Keyboard Layout\Preload","2","REG_SZ","00000804")
RegWrite("HKEY_CURRENT_USER\Keyboard Layout\Preload","1","REG_SZ","e0200804")
;添加输入法,RegWrite("HKEY_CURRENT_USER\Keyboard Layout\Preload","键名","数据类型",键值)

dllcall("user32.dll","long","LoadKeyboardLayout","str","e0230804","int",0x1)
dllcall("user32.dll","long","LoadKeyboardLayout","str","e0210804","int",0x2)
dllcall("user32.dll","long","LoadKeyboardLayout","str","00000804","int",0x3)
;立即激活输入法

最后多搜几个明白了。先清掉不需要的输入法。再添加注册表。再激活

TOP

上面的有点小问题,看了这位的明白了http://www.autoitx.com/viewthread.php?tid=1253

$rr=dllcall("user32.dll","long","LoadKeyboardLayout","str","E0220804","int",0x2);呼叫拼音++
DllCall("user32.dll","int","UnloadKeyboardLayout","long",$rr[0]);关闭拼音++,注意这个$rr[0]
$rr1=dllcall("user32.dll","long","LoadKeyboardLayout","str","E0230804","int",0x2);呼叫拼音++
DllCall("user32.dll","int","UnloadKeyboardLayout","long",$rr1[0]);关闭拼音++,注意这个$rr[0]
;清除输入法布局
RegWrite("HKEY_CURRENT_USER\Keyboard Layout\Preload","3","REG_SZ","e0210804")
RegWrite("HKEY_CURRENT_USER\Keyboard Layout\Preload","2","REG_SZ","00000804")
RegWrite("HKEY_CURRENT_USER\Keyboard Layout\Preload","1","REG_SZ","e0200804")
;添加输入法,RegWrite("HKEY_CURRENT_USER\Keyboard Layout\Preload","键名","数据类型",键值)

dllcall("user32.dll","long","LoadKeyboardLayout","str","e0200804","int",0x1)
dllcall("user32.dll","long","LoadKeyboardLayout","str","e0210804","int",0x2)
dllcall("user32.dll","long","LoadKeyboardLayout","str","00000804","int",0x3)
;立即激活输入法

TOP

返回列表