按键精灵吧 关注:499,551贴子:1,010,131
  • 19回复贴,共1

家境贫寒 8.8元付费求解答,麻烦大佬们看下了

只看楼主收藏回复

家境贫寒 8.8元付费求解答,麻烦大佬们看下了,先来后到,第一个有用可wx或zfb红包
这段是下面中间的一部分,现在这两段语句中间加个判断,如果 FindPic 0,0,1366,768,"Attachment:\3.bmp",0.9,intX,intY这个找图在2分钟内没有找到就回到第一个指令重新开始,找到了就继续下一步找色,如果两个找色在两分钟内都没事有找到也换回到这一总段的第一个指令,麻烦大佬们了

Do
FindPic 0,0,1366,768,"Attachment:\3.bmp",0.9,intX,intY
If intX> 0 And intY> 0 Then
MoveTo intX + 50, intY + 20
Delay 100
LeftClick 1
Exit Do
End If
Loop
Delay 200
For 50
FindColor 476, 519, 555, 547, "6C6C6C", intX, intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Else
End If
FindColor 409,572,621,618,"6C6C6C",intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Else
End If
Next
下划线/////////////////////////////////////////////////////////////////////////////上面是中间一段的////////////////////////////////////////////////
下划线/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
下划线//////////////////////////////////////////////////////////////////////////下面是一整段的//////////////////////////////////////////////////////
Do
FindPic 0,0,1366,768,"Attachment:\1.bmp",0.9,intX,intY
If intX> 0 And intY> 0 Then
MoveTo intX + 60, intY + 20
Delay 100
LeftClick 2
Exit Do
End If
Loop
Delay 100
KeyDown "Ctrl", 1
Delay 200
KeyDown "V", 1
Delay 200
KeyUp "V", 1
Delay 200
KeyUp "Ctrl", 1
Do
FindPic 0,0,1366,768,"Attachment:\2.bmp",0.9,intX,intY
If intX> 0 And intY> 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Exit Do
End If
Loop
Do
FindPic 0,0,1366,768,"Attachment:\3.bmp",0.9,intX,intY
If intX> 0 And intY> 0 Then
MoveTo intX + 50, intY + 20
Delay 100
LeftClick 1
Exit Do
End If
Loop
Delay 200
For 50
FindColor 476, 519, 555, 547, "6C6C6C", intX, intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Else
End If
FindColor 409,572,621,618,"6C6C6C",intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Else
End If
Next
Do
FindPic 0,0,1366,768,"Attachment:\4.bmp",0.9,intX,intY
If intX> 0 And intY> 0 Then
MoveTo intX + 200, intY + 20
Delay 100
LeftClick 1
Exit Do
End If
Loop
Do
FindPic 0,0,1366,768,"Attachment:\5.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Goto 跳出循环
Else
End If
FindPic 0,0,1366,768,"Attachment:\6.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Goto 跳出循环
Else
End If
FindPic 0,0,1366,768,"Attachment:\7.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Goto 跳出循环
Else
End If
FindPic 0,0,1366,768,"Attachment:\8.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Goto 跳出循环
Else
End If
FindPic 0,0,1366,768,"Attachment:\9.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Goto 跳出循环
Else
End If
FindPic 0,0,1366,768,"Attachment:\10.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Goto 跳出循环
Else
End If
FindPic 0,0,1366,768,"Attachment:\11.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Goto 跳出循环
Else
End If
FindPic 0,0,1366,768,"Attachment:\12.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 70, intY + 15
Delay 500
LeftClick 1
Goto 跳出循环
Else
End If
Loop
Rem 跳出循环
Do
FindPic 0,0,1366,768,"Attachment:\13.bmp",0.9,intX,intY
If intX> 0 And intY> 0 Then
MoveTo intX + 200, intY + 20
Delay 100
LeftClick 1
Exit Do
End If
Loop
Delay 100
KeyPress "A", 1
Delay 100
KeyPress "2", 1
Delay 200
Do
FindPic 0,0,1366,768,"Attachment:\14.bmp",0.9,intX,intY
If intX> 0 And intY> 0 Then
MoveTo intX + 60, intY + 20
Delay 100
LeftClick 1
Exit Do
End If
Loop
Do
FindPic 0,0,1366,768,"Attachment:\15.bmp",0.9,intX,intY
If intX> 0 And intY> 0 Then
MoveTo intX + 60, intY + 20
Delay 100
LeftClick 1
Exit Do
End If
Loop
Delay 1000
KeyDown "Ctrl", 1
Delay 100
KeyDown "W", 1
Delay 100
KeyUp "W", 1
KeyUp "Ctrl", 1
Delay 200
KeyDown "Alt", 1
Delay 100
KeyDown "Tab", 1
Delay 100
KeyUp "Tab", 1
KeyUp "Alt", 1
Delay 1000
KeyPress "Down", 1
Delay 100
KeyDown "Ctrl", 1
Delay 200
KeyDown "C", 1
Delay 200
KeyUp "C", 1
Delay 200
KeyUp "Ctrl", 1
Delay 200
KeyDown "Alt", 1
Delay 100
KeyDown "Tab", 1
Delay 100
KeyUp "Tab", 1
KeyUp "Alt", 1
Delay 1000


IP属地:浙江1楼2020-04-09 16:47回复


    IP属地:浙江2楼2020-04-09 16:50
    回复


      IP属地:浙江3楼2020-04-09 16:51
      回复


        IP属地:浙江4楼2020-04-09 16:53
        回复


          IP属地:浙江5楼2020-04-09 16:56
          回复


            IP属地:浙江6楼2020-04-09 16:59
            回复


              IP属地:浙江来自iPhone客户端7楼2020-04-09 17:12
              回复


                IP属地:浙江8楼2020-04-09 17:20
                回复
                  在吗。我私信你了。


                  IP属地:湖南9楼2020-04-09 17:22
                  收起回复


                    IP属地:浙江10楼2020-04-09 17:39
                    回复
                      本身这样的流程逻辑就有问题,必须goto,但是goto是编程禁忌。多用sub戓function才是正确的。
                      把你这几段分别写成几个涵数不就好控制流程了。


                      IP属地:广西来自Android客户端11楼2020-04-09 18:02
                      回复
                        如果非要用goto那么也简单,
                        rem 开始第一段
                        ……
                        t=timer
                        ret=0
                        while timer-t<120 '120秒
                        找图……
                        if 找到图
                        你的操作
                        ret=0
                        end if
                        delay 100
                        wend
                        if ret=0 then goto 开始
                        第二段同上


                        IP属地:广西来自Android客户端12楼2020-04-09 18:15
                        回复