// 定义三个变量用于标记三张图片是否找到,初始化为False表示未找到
Dim isPic1Found
isPic1Found = False
Dim isPic2Found
isPic2Found = False
Dim isPic3Found
isPic3Found = False
// 定义一个变量用于控制是否暂停第一张图片后续动作,初始为False表示不暂停
Dim isPausePic1Action
isPausePic1Action = False
// 主循环,只要三张图片没有全部找到就一直循环
While isPic1Found = False or isPic2Found = False or isPic3Found = False
// 查找第一张图
Delay 1000
FindPic 0, 0, 2560, 1080, "Attachment:\1.bmp", 0.9, intX, intY
If intX > -1 And intY > -1 Then
// 如果找到第一张图,标记为已找到
isPic1Found = True
// 执行找到第一张图后的动作
Delay 1000
MoveTo intX, intY
Delay 1000
LeftClick 1
Delay 1000
MoveTo 66, 166
Delay 1000
Delay 1000
Delay 1000
LeftClick 1
Delay 1000
LeftClick 1
Delay 1000
Delay 1000
Delay 1000
Delay 1000
Delay 1000
Delay 1000
KeyPress "Z", 1
For 85
Delay 500
MoveTo 2513, 663
Delay 500
LeftClick 1
Delay 500
MoveTo 2235, 452
Delay 500
LeftClick 1
Delay 500
MoveTo 2363, 877
Delay 500
LeftClick 1
Delay 500
MoveTo 2356, 1012
Delay 500
LeftClick 1
Delay 500
MoveTo 2278, 453
Delay 500
LeftClick 1
Delay 500
MoveTo 2363, 877
Delay 500
LeftClick 1
Delay 500
MoveTo 2356, 1012
Delay 500
LeftClick 1
Delay 500
MoveTo 2319, 453
Delay 500
LeftClick 1
Delay 500
MoveTo 2363, 877
Delay 500
LeftClick 1
Delay 500
MoveTo 2356, 1012
Delay 500
LeftClick 1
Delay 500
MoveTo 2363, 448
Delay 500
LeftClick 1
Delay 500
MoveTo 2363, 877
Delay 500
LeftClick 1
Delay 500
MoveTo 2356, 1012
Delay 500
LeftClick 1
Delay 500
MoveTo 2403, 448
Delay 500
LeftClick 1
Delay 500
MoveTo 2363, 877
Delay 500
LeftClick 1
Delay 500
MoveTo 2356, 1012
Delay 500
LeftClick 1
Delay 500
// 在循环85次的动作中查找第二张图片
Delay 1000
FindPic 0, 0, 2560, 1080, "Attachment:\2.bmp", 0.9, intX2, intY2
If intX2 > -1 And intY2 > -1 Then
isPic2Found = True
isPausePic1Action = True
// 执行第二张图片找到后的动作
KeyPress "CapsLock", 1
Delay 1000
MoveTo intX2, intY2
Delay 1000
LeftClick 1
Delay 1000
// 这里可以添加更多第二张图片对应要做的操作
// 操作完成后,等待按下CapsLock键继续后续动作
Do
If GetLastKey() = 58 // 58是按键精灵中CapsLock键对应的键码
isPausePic1Action = False
Exit Do
End If
Delay 100
Loop
End If
// 在循环85次的动作中查找第三张图片
Delay 1000
FindPic 0, 0, 2560, 1080, "Attachment:\3.bmp", 0.9, intX3, intY3
If intX3 > -1 And intY3 > -1 Then
isPic3Found = True
isPausePic1Action = True
// 执行第三张图片找到后的动作
KeyPress "CapsLock", 1
Delay 1000
MoveTo intX3, intY3
Delay 1000
LeftClick 1
Delay 1000
// 这里可以添加更多第三张图片对应要做的操作
// 操作完成后,等待按下CapsLock键继续后续动作
Do
If GetLastKey() = 58 // 58是按键精灵中CapsLock键对应的键码
isPausePic1Action = False
Exit Do
End If
Delay 100
Loop
End If
Next
// 85次循环结束后,重置相关状态,重新开始查找第一张图
isPic1Found = False
isPic2Found = False
isPic3Found = False
End If
Wend
脚本运行中暂停了不能重新启动,大佬们怎么解决啊