找回密码
 加入
搜索
查看: 1472|回复: 2

获取当前输入法~~~

[复制链接]
发表于 2008-6-10 03:07:32 | 显示全部楼层 |阅读模式
Opt("WinTitleMatchMode", 4)
Run("notepad.exe")
Sleep(500)
$hWnd = WinGetHandle("classname=Notepad")
MsgBox (0, "New Layout", _GetKeyboardLayout($hWnd))


Func _GetKeyboardLayout($hWnd)
    Local $ret = DllCall("user32.dll", "long", "GetWindowThreadProcessId", "hwnd", $hWnd, "ptr", 0)
          $ret = DllCall("user32.dll", "long", "GetKeyboardLayout", "long", $ret[0])
          Return "0000" Hex($ret[0], 4)
EndFunc
==================================================================================

Return "0000" Hex($ret[0], 4),这里提示“表达示错误”,何解..
谢谢

[ 本帖最后由 木纳 于 2008-6-10 03:10 编辑 ]
 楼主| 发表于 2008-6-10 03:10:14 | 显示全部楼层


自己的错..解决了..掉个符号.
发表于 2009-7-20 03:27:12 | 显示全部楼层
本帖最后由 東影神煌 于 2009-7-20 03:33 编辑

我是在中间加了个"="就没错误了..
只不过不清楚对不对..
运行之后是..FALSE..
测不出我的输入法..
所以应该是我错了..XDD
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-3 07:11 , Processed in 0.069668 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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