各位小伙伴们and大神们,大家好,上次我在这发了一个贴,询问一下关于区域找多图的问题,其中贴吧里面不少大神都很热心的为我解答了一下,但是由于本宝宝貌似天生愚钝,所以并没有很好地解决这个问题,我先简要说一下我的问题:首先是按left键来刷图片,然后刷图片时候不只是一些图片,有时候会跳出一些广告,这时候就需要按esc键退出广告书图片了,但是广告的样式有五六种,所以我必须能够识别出那几种广告来达到返回的目的,从而继续刷图片,大致流程就是这样,下面是我根据吧友然后自己写的一个脚本源码,希望各位小伙伴大神们能够不吝赐教,多多指点:
Dim intX,intY
For 1
FindPic 0,0,1024,768,"F:\1.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "Esc", 1
Delay 100
Else
KeyPress "Left", 1
Delay 100
Exit For
End If
FindPic 0,0,1024,768,"F:\2.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "Esc", 1
Delay 100
Else
KeyPress "Left", 1
Delay 100
Exit For
End If
FindPic 0,0,1024,768,"F:\3.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "Esc", 1
Delay 100
Else
KeyPress "Left", 1
Delay 100
Exit For
End If
FindPic 0,0,1024,768,"F:\4.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "Esc", 1
Delay 100
Else
KeyPress "Left", 1
Delay 100
Exit For
End If
FindPic 0,0,1024,768,"F:\5.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "Esc", 1
Delay 100
Else
KeyPress "Left", 1
Delay 100
Exit For
End If
Next
If intX > 0 Then
//找到了一张图后执行的代码
Else
//没找到图时执行的代码
End If
,最后谢谢大家能够帮助我,好人一生平安,各位万事如意,么么哒
Dim intX,intY
For 1
FindPic 0,0,1024,768,"F:\1.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "Esc", 1
Delay 100
Else
KeyPress "Left", 1
Delay 100
Exit For
End If
FindPic 0,0,1024,768,"F:\2.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "Esc", 1
Delay 100
Else
KeyPress "Left", 1
Delay 100
Exit For
End If
FindPic 0,0,1024,768,"F:\3.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "Esc", 1
Delay 100
Else
KeyPress "Left", 1
Delay 100
Exit For
End If
FindPic 0,0,1024,768,"F:\4.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "Esc", 1
Delay 100
Else
KeyPress "Left", 1
Delay 100
Exit For
End If
FindPic 0,0,1024,768,"F:\5.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "Esc", 1
Delay 100
Else
KeyPress "Left", 1
Delay 100
Exit For
End If
Next
If intX > 0 Then
//找到了一张图后执行的代码
Else
//没找到图时执行的代码
End If
,最后谢谢大家能够帮助我,好人一生平安,各位万事如意,么么哒