controlsend问题
我用au3写了个外挂,后台模拟发送键盘信息类型的,可是用了之后,键盘就失灵了,也不算失灵,就是键都乱了,比如按ESC会变成弹出开始菜单,想问下这是controlsend的问题吗,controlsend的原理是什么,在这个代码里面我只用这一个模拟键盘信息的命令,请达人指导一下,或者用别的命令代替也行,谢谢[ 本帖最后由 budgerigar 于 2008-6-13 11:29 编辑 ] 看你`所要模拟的游戏了,`很多游戏一般都不接受模拟.具体不清楚你的运用了. 这个游戏接受,按键对游戏是好用的,但是这个命令会带来系统问题,就是按键会乱,但游戏不乱,我也不知道为什么,下面是我的部分代码
If ($bloodc <= $bloodadd) Then
ControlSend("游戏窗口名字", "", $testhan, "1", 1)
EndIf
If ($bluec <= $blueadd) Then
ControlSend("游戏窗口名字", "", $testhan, "2", 2)
EndIf
$experience = _MemoryRead("0x" & Hex(0x07E3CD8), $Handle)
GUICtrlSetData($Input7, $experience)
If $experience - $expformer = 0 Then
$times = $times + 1
Else
$times = 0
EndIf
If $times >= 10 Then
ControlSend("游戏窗口名字", "", $testhan, "l", 1)
Sleep(1000)
ControlSend("游戏窗口名字", "", $testhan, "l", 1)
EndIf
If $times >= 20 Then
ControlSend("游戏窗口名字", "", $testhan, ",", 1)
ControlSend("游戏窗口名字", "", $testhan, "l", 1)
Sleep(1000)
ControlSend("游戏窗口名字", "", $testhan, "l", 1)
EndIf
$expformer = $experience
$expincrease = $experience - $expf
GUICtrlSetData($Input6, $expincrease)
ControlSend("游戏窗口名字", "", $testhan, " ", 1)
ControlSend("游戏窗口名字", "", $testhan, " ", 1)
ControlSend("游戏窗口名字", "", $testhan, "`", 1)
$delay = 0
While ($experience - $expformer) = 0 And $delay < 12
ControlSend("游戏窗口名字", "", $testhan, "4", 1)
ControlSend("游戏窗口名字", "", $testhan, " ", 1)
$bloodc = _MemoryRead("0x" & Hex($jizhi + 28936), $Handle)
If ($bloodc <= $bloodadd) Then
ControlSend("游戏窗口名字", "", $testhan, "1", 1)
EndIf
$bluec = _MemoryRead("0x" & Hex($jizhi + 28952), $Handle)
If ($bluec <= $blueadd) Then
ControlSend("游戏窗口名字", "", $testhan, "2", 2)
EndIf
Sleep(50)
$experience = _MemoryRead("0x" & Hex(0x07E3CD8), $Handle)
$delay = $delay + 1
WEnd
页:
[1]