按键精灵——针对个人练度的12-4挂机脚本 最终版

前言

与第一次发的最初版本相比,最终版所做的最大的改进就是对于延迟的处理

最终版代码(核心循环部分)

Delay 2000
i=0
For i = 0 To 1
    Delay 200
    FindPic 0, 0, 1920, 1080, "Attachment:\三星.bmp", 0.8, z, q
    Delay 200
    If z > 0 And q > 0 Then
        MoveTo z+40, q+80
        LeftClick 1
        Delay 1000
    End If
    Delay 200
    FindPic 0, 0, 1920, 1080, "Attachment:\二星.bmp", 0.8, g, h
    Delay 200
    If g > 0 And h > 0 Then
        MoveTo g+40, h+80
        LeftClick 1
        Delay 1000
    End If
    Delay 200
    While True
        FindPic 0, 0, 1920, 1080, "Attachment:\shengli.bmp", 0.8, a, b
        Delay 200
        If a > 0 And b > 0 Then 
            Delay 200
            MoveTo a, b
            LeftClick 1
            Delay 1000
            MoveTo a+100, b+100
            LeftClick 1
            Delay 200
        End If
        Delay 200
        FindPic 0, 0, 1920, 1080, "Attachment:\精锐.bmp", 0.8, intX, intY
        Delay 200
        If intX > 0 And intY > 0 Then
            MoveTo 1445, 422
            LeftClick 1
            Delay 2000
        End If
        Delay 200
        FindPic 0, 0, 1920, 1080, "Attachment:\确定.bmp", 0.8, e, f
        Delay 200
        If e > 0 And f > 0 Then
            MoveTo e, f
            LeftClick 1
            Delay 8000
            FindPic 0, 0, 1920, 1080, "Attachment:\支线.bmp", 0.8, j, k
            Delay 200
            If j > 0 And k > 0 Then 
                MoveTo e, f
                LeftClick 1
                Delay 1000
                Goto k
            End If
            Goto k
            Delay 200
        End If
        Delay 200
    Wend
    Rem k
    Delay 200    
Next
Delay 3000
KeyPress "F1", 1
Delay 200
KeyPress "F6", 1

最终版的效率相比最初版本,提升的可不是一星半点

古德拜~么么(^.ペ)γ

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值