按键精灵出现图片跳过第一段命令进行下一段命令
这是我刚写的FindPic0,0,414,325,"Attachment:\图1.bmp",0.9,intX,intYIfintX>0AndintY>0ThenMoveT...
这是我刚写的
FindPic 0,0,414,325,"Attachment:\图1.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 1
End If
想在这里加一段就是如果出现图3则跳过下面这段,
Delay 1200
MoveTo 488, 712
LeftClick 2
Delay 700
SayString "你好"
Delay 700
KeyPress "Enter", 1
Delay 700
然后从这里开始
FindPic 195,244,934,833,"Attachment:\图2.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
WaitKey
End If
MoveTo 1232, 81
LeftClick 1
Delay 700
FindPic 25, 329, 407, 547, "Attachment:\图1.bmp", 0.9, intX, intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 1
End If
Delay 1200
MoveTo 488, 712
LeftClick 2
Delay 700
SayString "你好"
Delay 700
KeyPress "Enter", 1
Delay 700
FindPic 195,244,934,833,"Attachment:\图2.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
WaitKey
End If
MoveTo 1232, 81
LeftClick 1
Delay 700 展开
FindPic 0,0,414,325,"Attachment:\图1.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 1
End If
想在这里加一段就是如果出现图3则跳过下面这段,
Delay 1200
MoveTo 488, 712
LeftClick 2
Delay 700
SayString "你好"
Delay 700
KeyPress "Enter", 1
Delay 700
然后从这里开始
FindPic 195,244,934,833,"Attachment:\图2.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
WaitKey
End If
MoveTo 1232, 81
LeftClick 1
Delay 700
FindPic 25, 329, 407, 547, "Attachment:\图1.bmp", 0.9, intX, intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 1
End If
Delay 1200
MoveTo 488, 712
LeftClick 2
Delay 700
SayString "你好"
Delay 700
KeyPress "Enter", 1
Delay 700
FindPic 195,244,934,833,"Attachment:\图2.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
WaitKey
End If
MoveTo 1232, 81
LeftClick 1
Delay 700 展开
展开全部
这代码我有即视感,前段时间也有问我这样的代码。
我给你加段判断代码就好了,你需要他判断多长时间呢?几秒还是只判断一次?
把下面代码替换你需要判断图三的那段就好了,>= 3是检测三秒,更改数字就可以更改检测的时间,如果只需要检测一次,那么只需要Do到Loop中间的代码。
Z = time
Do
FindPic 0,0,414,325,"Attachment:\图3.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
Delay 1200
MoveTo 488, 712
LeftClick 2
Delay 700
SayString "你好"
Delay 700
KeyPress "Enter", 1
Delay 700
End If
Loop Until DateDiff("s", Z, time) >= 3
我给你加段判断代码就好了,你需要他判断多长时间呢?几秒还是只判断一次?
把下面代码替换你需要判断图三的那段就好了,>= 3是检测三秒,更改数字就可以更改检测的时间,如果只需要检测一次,那么只需要Do到Loop中间的代码。
Z = time
Do
FindPic 0,0,414,325,"Attachment:\图3.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
Delay 1200
MoveTo 488, 712
LeftClick 2
Delay 700
SayString "你好"
Delay 700
KeyPress "Enter", 1
Delay 700
End If
Loop Until DateDiff("s", Z, time) >= 3
更多追问追答
追问
求出答案没
追答
FindPic 0,0,414,325,"Attachment:\图1.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 1
End If
Z = time
Do
FindPic 0,0,414,325,"Attachment:\图3.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
Goto X
End If
Loop Until DateDiff("s", Z, time) >= 3
Delay 1200
MoveTo 488, 712
LeftClick 2
Delay 700
SayString "你好"
Delay 700
KeyPress "Enter", 1
Delay 700
Rem X
FindPic 195,244,934,833,"Attachment:\图2.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
WaitKey
End If
MoveTo 1232, 81
LeftClick 1
Delay 700
FindPic 25, 329, 407, 547, "Attachment:\图1.bmp", 0.9, intX, intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 1
End If
Delay 1200
MoveTo 488, 712
LeftClick 2
Delay 700
SayString "你好"
Delay 700
KeyPress "Enter", 1
Delay 700
FindPic 195,244,934,833,"Attachment:\图2.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
WaitKey
End If
MoveTo 1232, 81
LeftClick 1
Delay 700
才发现看错了你的要求,直接整个复制上面的代码就好了,我不清楚你图三检测的范围,也不清楚你的图三是否是这个名字,所以你需要自行修改一下东西。
2015-10-16
展开全部
Do
FindPic 0,0,414,325,"Attachment:\图1.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 1
Exit Do
Else
//想在这里加一段就是如果出现图3则跳过下面这段,
Delay 1200
MoveTo 488, 712
LeftClick 2
Delay 700
SayString "你好"
Delay 700
KeyPress "Enter", 1
Delay 700
End If
Loop
//然后从这里开始
FindPic 195,244,934,833,"Attachment:\图2.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
WaitKey
End If
MoveTo 1232, 81
LeftClick 1
Delay 700
FindPic 25, 329, 407, 547, "Attachment:\图1.bmp", 0.9, intX, intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 1
End If
Delay 1200
MoveTo 488, 712
LeftClick 2
Delay 700
SayString "你好"
Delay 700
KeyPress "Enter", 1
Delay 700
FindPic 195,244,934,833,"Attachment:\图2.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
WaitKey
End If
MoveTo 1232, 81
LeftClick 1
Delay 700
不知道理解的对不对,找到第一个图片就跳过下面那段,找不到图片就运行下面那段。
追问
大概是这样的意思,我要在网页上点击对话框发送问候,然后图1是点击图标,图2是发送太多出现的验证码要暂停,输入验证码,图3是需要添加好友才能发送,所以出现图3要跳过下面的步骤,在下一段区域再重复上面的步骤。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询