ControlSend的问题
一个游戏 ControlSend 发送1 2 等数字键 可以把数字键换成 !a 用来发送 alt+a 却不能生效了
请问这2种有什么不一样呢
为什么
ControlSend($GameTitle, "", "", "1")
可以
而
ControlSend($GameTitle, "", "", "!a")
无效
:face (35):
==================================================
放弃了 应该是游戏处理消息的方式不同吧
http://www.autoitx.com/forum.php?mod=viewthread&tid=6500&extra=page%3D1
[ 本帖最后由 sxd 于 2009-4-18 14:24 编辑 ] WinActive("","")
Send("!a") 只是不明白 为什么 1 2 3 可以 而!a 不行
前台的话 应该没问题 发送数字键1 2 3是成功的
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_KEYDOWN, _
"int", 0x31, _
"int", 0)
Sleep(100)
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_KEYUP, _
"int", 0x31, _
"int", 0)
发送alt+a 却不行
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_SYSKEYDOWN, _
"int", 0x12, _
"int", 0)
Sleep(100)
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_KEYDOWN, _
"int", 0x41, _
"int", 0)
Sleep(100)
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_KEYUP, _
"int", 0x41, _
"int", 0)
Sleep(100)
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_SYSKEYUP, _
"int", 0x12, _
"int", 0)
[ 本帖最后由 sxd 于 2009-4-18 00:43 编辑 ]
页:
[1]