Dim
intX,intY
Dim
测试找按键精灵 = {
"按键精灵"
,3 , 255, 165, 434, 371,
"按键精灵"
,
"000000"
,0,0.9}
If
isExist(测试找按键精灵)
Then
End
If
Function
isExist(tb)
Dim
Sret =
False
Select
Case
tb[2]
Case
0
FindColor
tb[3], tb[4], tb[5], tb[6], tb[7], tb[8], tb[9], intX, intY
If
intX > -1
And
intY > -1
Then
TracePrint
"找色识别 : "
& tb[1] &
"--坐标 : "
& intX &
"--"
& intY
Sret =
True
End
If
Case
1
If
CmpColorEx
(tb[3], tb[4]) = 1
Then
TracePrint
"比色识别 : "
& tb[1]
Sret =
True
End
If
Case
2
FindMultiColor
tb[3], tb[4], tb[5], tb[6], tb[7], tb[8], tb[9], tb[10], intX, intY
If
intX > -1
And
intY > -1
Then
TracePrint
"多点找色 : "
& tb[1] &
"--坐标 : "
& intX &
"--"
& intY
Sret =
True
End
If
Case
3
FindPic
tb[3], tb[4], tb[5], tb[6],
"Attachment:"
& tb[1] &
".png"
, tb[7], tb[8], tb[9], intX, intY
If
intX > -1
And
intY > -1
Then
TracePrint
"找图识别 : "
& tb[1] &
"--坐标 : "
& intX &
"--"
& intY
Sret =
True
End
If
End
Select
isExist = Sret
End
Function