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
举报
回复 xtybfgu 你的代码只能对于一些输入法有效,搜狗、QQ这类的都无法识别的。。全部提示未知输 ... zcx880517 发表于 2010-7-17 09:43
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-2-25 05:03 , Processed in 0.074275 second(s), 19 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.