1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Hwnd = Plugin.Window.MousePoint()
Arr = Split(Plugin.Window.GetWindowRect(Hwnd), "|")
Do
Call 找多圖(Arr(0), Arr(1), Arr(2), Arr(3), "C:\Users\user306\Desktop\測試.bmp", 1.0)
Loop
Function 找多圖(起點X,起點Y,終點X,終點Y,圖片,相似度)
Dim tx, ty, tx1, ty1
找到的座標=""
tx = 起點X : ty = 起點Y : tx1 = 終點X : ty1 = 終點Y
Do
FindPic tx, ty, tx1, ty1, 圖片, 相似度, intX, intY
If intX > 0 and intY > 0 Then
找到的座標 = 找到的座標 & intX & "," & intY & "|"
MoveTo intX,intY
Delay 100
LeftClick 1
Delay 100
tx = intX + 5
ty = intY
Else
ty = ty + 5
tx = 起點X
If intX = - 1 and intY = - 1 Then
FindPic tx, ty, tx1, ty1, 圖片,相似度, intX, intY
If intX > 0 and intY > 0 Then
找到的座標 = 找到的座標 & intX & "," & intY & "|"
MoveTo intX,intY
Delay 100
LeftClick 1
Delay 100
tx = intX + 5
ty = intY
Else
Exit Do
End If
End If
End if
Loop
End Function