[其他]代码库
RunApp "com.baidu.browser.apps"
// Tap 210,916 //咨询
// Call 咨询()
// Call srollbottom(10)
// Call ranDelayT()
// Call srolltop(10)
// KeyPress "Back"
// Call ranDelayT()
// Call homepage()
Call Function ranDelayT(0,10000)
If CmpColorEx("73|348|00ECA7,81|354|00ECA7,43|393|9A9A9A,88|390|898989",0.9)=1 Then
TracePrint "wweew"
Tap 64,345
Call ranDelayT()
End If
Call srollbottom(10)
//返回首页
Function homepage
Tap 65,916
End Function
//随机延迟
Function ranDelayT(minDelay,maxDelay)
Dim ranDelay
Randomize
ranDelay = Int(maxDelay * Rnd())+minDelay/1000
TracePrint ranDelay
Delay ranDelay
End If
End Function
//随机点击
Function MainRan
Randomize
dim caseid=Int (7 * Rnd())
Select Case caseid
Case 0, 1 //网页导航
Tap 64, 345
Delay 2000
Call browseEX()
Case 2
Tap 217, 357
Delay 2000
Call browseEX()
Case 3
Tap 210,916 //咨询
Delay 2000
Call 咨询()
Call browseEX()
Case 4
Tap 336,919 //星球
Delay 2000
Call browseEX()
Case 5
Tap 473,914 //我的
Delay 2000
Call browseEX()
Case 6
Tap 334,344 //百度影视
Delay 2000
Call browseEX()
Case 7
Tap 474, 343
Delay 2000
Call browseEX()//小说
End Select
End Function
//上滚动
Function srollbottom(times)
TracePrint "bot"
Randomize
Dim srollbot=int(times*Rnd())+1
For srollbot
TouchDown 291, 610,1
TouchMove 291, 318,1,1000
TouchUp
Next
End Function
//下滚动
Function srolltop(times)
Randomize
Dim srolltop_t=int(times*Rnd())+1
For srolltop_t
TouchDown 291, 318,1
TouchMove 291, 610,1,1000
TouchUp
Next
End Function
//咨询窗口逻辑
Function 咨询
Tap 210,916 //咨询
Dim i=1
Do Until i = 2
Call srollbottom(10)
Dim intX,intY
FindMultiColor 363,413,532,654,"B9B9B9","-11|-5|696969,13|-4|5D5D5D",0,0.8,intX,intY
If intX > -1 And intY > -1 Then
Tap intX,intY
i=2
TracePrint "naaaa"
End If
Loop
End Function
//平常浏览
Function normalbrowse(times)
Call srollbottom(times)
Call ranDelayT()
Call srolltop(times)
End Function
//平常浏览加强版
Function browseEX
Call srollbottom(10)
Call ranDelayT()
Call srolltop(10)
KeyPress "Back"
Call ranDelayT()
Call homepage()
End Function