按键精灵吧 关注:499,753贴子:1,016,383
  • 3回复贴,共1

写了个判断找图的句子,求大神帮看看为什么不成功。。。

只看楼主收藏回复

想实现的效果是如果找不到第一张图,才会执行找第二张图后的点击命令,但一直不成功。。。
Dim found
FindPic 0,0,1920,1080,"C:\Users\01.bmp",0.9,intX,intY
If intX < 0 And intY < 0 Then
found = 1
Else
found = 0
End If
If found = 1 Then
FindPic 0,0,1920,1080,"C:\Users\02.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
SaveMousePos
MoveTo intX, intY
Delay 500
LeftClick 1
RestoreMousePos
End If
End If


1楼2019-04-30 12:15回复
    FindPic 0,0,1920,1080,"C:\Users\01.bmp",0.9,intX,intY
    If intX < 0 And intY < 0 Then
    FindPic 0,0,1920,1080,"C:\Users\02.bmp",0.9,intX,intY
    If intX > 0 And intY > 0 Then
    SaveMousePos
    MoveTo intX, intY
    Delay 500
    LeftClick 1
    RestoreMousePos
    End If
    End If


    IP属地:广西2楼2019-04-30 12:22
    收起回复