
按键精灵里找图,连续找图并执行命令?
我需要连续三个地方都是我要求的图才可以停止脚本,其中鼠标可以不用移动位置。脚本命令需要先在A处找图,A处找图失败就在S点鼠标单击两次,A处找图成功就执行B处的找图,B处没...
我需要连续三个地方都是我要求的图才可以停止脚本,其中鼠标可以不用移动位置。脚本命令需要先在A处找图,A处找图失败就在S点鼠标单击两次,A处找图成功就执行B处的找图,B处没找到就回到S点鼠标单击两次,A处B处同时找图成功就执行C处找图,C处没找到就回到S点鼠标单击两次,A处B处C处同时找图成功就停止脚本运行。
以下是我自己编辑的源文件,修改了好多次都失败了,这个脚本只会执行一次,第二次找图失败并没有回到S点单击,不知道是哪里出了问题,抠了抠脑壳。求大神帮帮忙!
MoveTo 457, 522
FindPic 434, 735, 452, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 And intY < 0 Then LeftClick 2
If intX > 0 And intY > 0 Then FindPic 526, 735, 542, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 And intY < 0 Then LeftClick 2
If intX > 0 And intY > 0 Then FindPic 615, 735, 632, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 And intY < 0 Then LeftClick 2
If intX > 0 And intY > 0 Then EndScript 展开
以下是我自己编辑的源文件,修改了好多次都失败了,这个脚本只会执行一次,第二次找图失败并没有回到S点单击,不知道是哪里出了问题,抠了抠脑壳。求大神帮帮忙!
MoveTo 457, 522
FindPic 434, 735, 452, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 And intY < 0 Then LeftClick 2
If intX > 0 And intY > 0 Then FindPic 526, 735, 542, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 And intY < 0 Then LeftClick 2
If intX > 0 And intY > 0 Then FindPic 615, 735, 632, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 And intY < 0 Then LeftClick 2
If intX > 0 And intY > 0 Then EndScript 展开
1个回答
展开全部
MoveTo 457, 522
Do
i = i + 1
字符串 = "第 " & i & " 次找图"
For 1
FindPic 434, 735, 452, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 Then
TracePrint 字符串 & " ,A处没找到"
Exit For
End If
FindPic 526, 735, 542, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 Then
TracePrint 字符串 & " ,B处没找到"
Exit For
End If
FindPic 615, 735, 632, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 Then
TracePrint 字符串 & " ,C处没找到"
Exit For
Else
TracePrint 字符串 & " ,C处找到了"
EndScript
End If
Next
Delay 200
LeftClick 2
Delay 400
Loop
Do
i = i + 1
字符串 = "第 " & i & " 次找图"
For 1
FindPic 434, 735, 452, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 Then
TracePrint 字符串 & " ,A处没找到"
Exit For
End If
FindPic 526, 735, 542, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 Then
TracePrint 字符串 & " ,B处没找到"
Exit For
End If
FindPic 615, 735, 632, 757, "Attachment:\1.bmp", 0.9, intX, intY
If intX < 0 Then
TracePrint 字符串 & " ,C处没找到"
Exit For
Else
TracePrint 字符串 & " ,C处找到了"
EndScript
End If
Next
Delay 200
LeftClick 2
Delay 400
Loop
追问
谢谢!!这个脚本会循环点击S点了,但是ABC同时找到的时候不知道为啥没有终止脚本运行,还在不停的点S点,好心累
追答
EndScript 换 exitScript试试
在不行就 换 exit do

2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询