多点找色
Function 多点比色(arr)
Delay 50
dim t=TickCount()
KeepCapture
If CmpColorEx(arr(0), arr(1)) = 1 Then
多点比色 = True
End If
ReleaseCapture
TracePrint "多点比色"&TickCount()-t
End Function
//For 10
//dim 连接状态 = Array("471|975|FFFFFF,477|999|FFFFFF,518|989|FFFFFF,535|599|FF8045,536|438|FF8045", 0.9)
//If 多点比色(连接状态) = true Then
// TracePrint "找到了"
//End If
// Delay 2000
//Next
//作业:比色判断页面CmpColorEx:注册界面 = Array("161|98|3A3A3A,467|167|3A3A3A,995|793|EEAA00,576|929|EEAA00,173|937|EEAA00",0.9)

xml对比
Function xml对比(a)
dim t=TickCount()
Dim m=shanhai.getuixml() //获取当前XML
Delay 50
If UTF8.InStr(1, m, a) > 0 Then //找当前界面的关键词
xml对比 = true
End If
TracePrint "xml对比"&TickCount()-t
End Function
//作业:
//If xml对比("未分类") = True Then
// TracePrint "找到了"
//End If

找图对比
Function 找图对比(arr)
找图对比=False //先预定值为错
Delay 500
dim t=TickCount()
KeepCapture
FindPic arr(0), arr(1),arr(2), arr(3), "Attachment:"&arr(4)& ".png", "000000", 0, 0.9, intX, intY
If intX > -1 And intY > -1 Then
TracePrint arr(4)&"_界面正确"
TracePrint intX,intY
找图对比=True
Else
找图对比=False
TracePrint arr(4)&"_界面错误"
End If
TracePrint "找图对比"&TickCount()-t
ReleaseCapture
End Function
//作业:
//dim 爱界面=Array(140,83,838,236,"爱")
//If 图片对比(爱) = True Then
// TracePrint "找到了"
//End If

Orc对比
Function Orc对比(arr)
Orc对比=False:Delay 100 //预定为False
SnapShot arr(1), arr(2), arr(3), arr(4), arr(5) //截图 SnapShot "/sdcard/test.png",100,100,300,300
Delay 500
dim t=TickCount()
//Dim FileOrc=CStr("""" & arr(1) & """")
Dim FileOrc=CStr(arr(1))
TracePrint FileOrc
dim json=MyPlugin.ReadFileOrc(FileOrc)
TracePrint json
dim a=UTF8.Len("json")
TracePrint a
If a < 4 Then
Orc对比=False
Exit Function
End If
dim table = Cjson.Decode(json)
For Each k , v In table
TracePrint k
For Each k1 , v1 In v
TracePrint v1
arr(0) = v1
Orc对比=true
Next
Next
TracePrint "ORC速率"&TickCount()-t
End Function
//作业:
//dim 连接状态界面=Array("未","/sdcard/jin.jpg",433,127,499,189) //定义关键词,截图地址,坐标
//If Orc对比(连接状态界面) = true Then :TracePrint 1:End If
