找回密码
 加入
搜索
楼主: 你没有kii

[AU3基础] AU3注册表调整输入法,不重启立即生效。或关闭输入法,设某输入法为默认(已解决)

  [复制链接]
 楼主| 发表于 2017-1-14 11:45:32 | 显示全部楼层
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)
;立即激活输入法

最后多搜几个明白了。先清掉不需要的输入法。再添加注册表。再激活
 楼主| 发表于 2017-1-14 13:06:16 | 显示全部楼层
上面的有点小问题,看了这位的明白了http://www.autoitx.com/forum.php?mod=viewthread&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)
;立即激活输入法
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-11 11:31 , Processed in 0.064310 second(s), 13 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表