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

求高手帮修正一段很简单的代码,修正完成给200元感谢费。

[复制链接]
发表于 2012-7-15 20:57:49 | 显示全部楼层 |阅读模式
源代码
#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


本人菜鸟,上面这段脚本我想改成纯后台的。
问题是一开始的后台颜色判断,和在后台按住某个键一段时间后放开,还有后台的鼠标移动和点击我怎么也做不到。

所以求高手帮改下,完成能用后给200元感谢费,充话费或者支付宝充给你都行,绝不食言。

我QQ54243124,直接加我QQ谈也行
发表于 2012-7-24 12:19:53 | 显示全部楼层
回复 1# jincool


    如果要按住(保持按下状态)某个按键
    Send("{a down}") ;按住按键 A
发表于 2012-8-8 19:09:39 | 显示全部楼层
不如加qq说我是这么觉得的,这么机械的玩意用按键做更简单。  106182722
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-23 16:15 , Processed in 0.077145 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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