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

[AU3基础] 求高手帮我看下这段后台代码,要怎么修改才能正常后台运行

[复制链接]
发表于 2012-7-15 21:16:33 | 显示全部楼层 |阅读模式
#Include <WinAPI.au3>
$hwnd=WinGetHandle("洛奇英雄传")

If PixelGetColor (114,61)=0x162D3E  Then

Sleep ((520))
For $i = 1 To 225
ControlSend($hwnd, "", "", "{f8}")
Sleep (150)
ControlSend($hwnd, "", "", "{0}")
Sleep (150)
ControlSend($hwnd, "", "", "{number4}")
Sleep (300)
ControlSend($hwnd, "", "", "{number1}")
Sleep (200)
Call Plugin.Bkgnd.Keydown(Hwnd, 87)
Sleep (300)
Call Plugin.Bkgnd.Keyup(Hwnd, 87)
Sleep ((520))
ControlSend($hwnd, "", "", "{number4}")
Sleep (300)
ControlSend($hwnd, "", "", "{number1}")
Sleep (400)
Call Plugin.Bkgnd.Keydown(Hwnd, 87)
Sleep (1000)
Call Plugin.Bkgnd.Keyup(Hwnd, 87)
ControlSend($hwnd, "", "", "{f7}")
Sleep (520)
ControlSend($hwnd, "", "", "{number3}")
Sleep (520)
ControlSend($hwnd, "", "", "{number3}")
Sleep (520)
ControlSend($hwnd, "", "", "{number3}")
Sleep (520)
ControlSend($hwnd, "", "", "{number3}")
Sleep (520)
ControlSend($hwnd, "", "", "{number3}")
Sleep (520)
ControlSend($hwnd, "", "", "{number3}")
Sleep (520)
ControlSend($hwnd, "", "", "{number3}")
Sleep (520)
ControlSend($hwnd, "", "", "{number3}")
Sleep (520)
ControlSend($hwnd, "", "", "{number3}")
Sleep (520)
ControlSend($hwnd, "", "", "{f4}")     
Sleep (6000)
endfor
    Sleep (600)
    CControlSend($hwnd, "", "", "{/}")
    Sleep (1520)
    MouseMove 272, 592
    Sleep (300)
    MouseClick("left")
    Sleep (600)
    MouseMove 613, 480
    Sleep (300)
    MouseClick("left")
    Sleep (4000)
    ControlSend($hwnd, "", "", "{f8}")
    Sleep (7000)
    MouseMove 790, 733
    Sleep (300)
    MouseClick("left")
    Sleep (8000)
    MouseMove 398, 731
    Sleep (300)
    MouseClick("left")
    Sleep (27000)
    ControlSend($hwnd, "", "", "{f8}")
    Sleep (100)
    ControlSend($hwnd, "", "", "{f12}")
    Sleep (100)
    MouseMove 789, 534
    Sleep (520)
    MouseClick("left")
    Sleep (520)
    MouseClick("left")
    Sleep (2520)
    MouseMove 226, 678
    Sleep (300)
    MouseClick("left")
    Sleep (17000)
    ControlSend($hwnd, "", "", "{f3}")
    Sleep (8000)
    Else
    Sleep (600)
    ControlSend($hwnd, "", "", "{/}")
    Sleep (1520)
    MouseMove 272, 592
    Sleep (300)
    MouseClick("left")
    Sleep (600)
    MouseMove 613, 480
    Sleep (300)
    MouseClick("left")
    Sleep (4000)
    ControlSend($hwnd, "", "", "{f8}")
    Sleep (7000)
    MouseMove 790, 733
    Sleep (300)
    MouseClick("left")
    Sleep (8000)
    MouseMove 398, 731
    Sleep (300)
    MouseClick("left")
    Sleep (27000)
    ControlSend($hwnd, "", "", "{f8}")
    Sleep (100)
    ControlSend($hwnd, "", "", "{f12}")
    Sleep (100)
    MouseMove 789, 534
    Sleep (520)
    MouseClick("left")
    Sleep (520)
    MouseClick("left")
    Sleep (2520)
    MouseMove 226, 678
    Sleep (300)
    MouseClick("left")
    Sleep (17000)
    ControlSend($hwnd, "", "", "{f3}")
    Sleep (8000)
    End If


基本上都能后台运行了,但是有三个地方我怎么改都弄不好。

1,是开头的后台颜色判断

2,是不知道怎么实现,后台按住W1秒后放开

3,是无法实现,后台的鼠标移动和后点鼠标点击。

帮忙完成的人我给200元感谢费。

我QQ54243124
 楼主| 发表于 2012-7-15 21:24:22 | 显示全部楼层
我已经在这个东西上浪费2天时间了,

能帮忙的人谢谢啦。钱的话我充你支付宝,或者直接给你充话费都行。绝不食言
发表于 2012-7-16 18:57:18 | 显示全部楼层
后台找色那个没有思路,其他应该挺简单的
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-28 02:28 , Processed in 0.078060 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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