按鍵精靈在微信的自動(dòng)看新聞,回消息的腳本代碼:Function rndTap(x,y)Dim suijiRandomize suiji = Int(((4-0+1) * Rnd()) + 1) Tap x + suiji, y + suijiEnd Function//隨機(jī)滑屏Function rndMove(x,y,x1,y1,yanshi)Dim suijiRandomize suiji = Int(((4 - 0 + 1) * Rnd()) + 1)TouchDown x + suiji, y + suiji, 1TouchMove x1 + suiji, y1 + suiji, 1, yanshi + suiji * 100TouchUp 1End Function//多點(diǎn)降低相似度找色Function sfindColor(t)FindMultiColor t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[12],t[13] //t[8]相似度If t[12] = -1 And t[13] = -1 ThenFindMultiColor t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]-0.1,t[14],t[15] //t[8]相似度If t[14] > -1 And t[15] > -1 Then TracePrint t[14],t[15]t[11] = 1If t[10] = 1 Then rndTap(t[14],t[15])Delay 100End IfElse TracePrint"還是沒找到"&t[9]t[11] = 0TracePrint t[11]End IfElse TracePrint t[12],t[13]t[11] = 1If t[10] = 1 Then rndTap t[12],t[13]Delay 100End IfEnd IfEnd Function//降低相似度找圖Function sfindPic(t)Dim intX,intYFindPic t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],intX,intY //t[8]相似度If intX = -1 And intY = -1 ThenFor 2Dim intX1,intY1FindPic t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]-0.1,intX1,intY1 //t[8]相似度If intX1 > -1 And intY1 > -1 Then If t[10]=1 ThenrndTap(intX1,intY1)Delay 1500End IfExit ForElse TracePrint"還是沒找到"&t[9]t[11] = 0TracePrint t[11]End IfNextElse If t[10]=1 ThenrndTap(intx,inty)Delay 100End IfEnd IfEnd Function//重啟appFunction 重啟app(apk)KeyPress "Home"Delay 2000KillApp apkRunApp apkDelay 20000End FunctionFunction 讀取(a,路徑)//a傳入空數(shù)組接收倦春,路徑傳入要讀取的文件路徑Dim 行數(shù)Dim 結(jié)果=array()Dim i=1行數(shù) = File.linesnumber(路徑) //讀取該文本文件的行數(shù)TracePrint 行數(shù) //返回行數(shù)2For 行數(shù) 結(jié)果 = File.ReadLines(路徑)//調(diào)試輸出數(shù)組TracePrint 結(jié)果[i]a[i]=結(jié)果[i]i=i+1NextEnd Function//以上為通用函數(shù)
Function runfront(t,apk)//把應(yīng)用放置在前臺(tái)運(yùn)行,t定義為空數(shù)組廊蜒,接收運(yùn)行結(jié)果If Sys.IsRunning(apk) = true Then TracePrint"app正在運(yùn)行" t[1]=1 Else TracePrint "app沒有運(yùn)行,即將運(yùn)行app" RunApp apk Delay 3000End If If Sys.AppIsFront(apk) = True Then TracePrint "app在前臺(tái)" t[2]=1 Else TracePrint "app不在前臺(tái)" RunApp apk Delay 3000End IfEnd FunctionFunction findmenu(t,z)//找底部導(dǎo)航,t,z定義為空數(shù)組溅漾,接收運(yùn)行結(jié)果For i=0 to 5sfindColor (menu1)Delay 500 If menu1[11] = 0 Then TracePrint"not at menu1" t[1]=0 sfindColor (menu2) Delay 500 If menu2[11] = 0 Then TracePrint"not at menu2" t[2]=0 sfindColor (menu3) Delay 500 If menu3[11] = 0 Then TracePrint"not at menu3" t[3]=0 sfindColor (menu4) Delay 500 If menu4[11] = 0 Then TracePrint"not at menu4,not at any menu!" t[4] = 0 KeyPress "Back" Delay 3000 If i = 5 Then TracePrint"back 5 times,not find yet!" z[1]=0 End If Else TracePrint"at menu4" t[4] = 1 Exit For End If Else TracePrint"at menu3" t[3] = 1 Exit For End If Else TracePrint"at menu2" t[2] = 1 Exit For End If Else TracePrint"at menu1" t[1] = 1 Exit For End IfNextEnd FunctionFunction gomenu(t,z)//去某個(gè)底部導(dǎo)航,t為findmenu的接收參數(shù)的數(shù)組著榴,數(shù)組z[1]傳入要找的menu序號(hào)添履,z[2]傳入menu的x坐標(biāo)z[3]傳入menu的y坐標(biāo)If t[1] = 1 Then TracePrint "you at menu1,is going to menu",z[1] rndTap z[2],z[3]End IfIf t[4] = 1 Then TracePrint "you at menu4,is going to menu",z[1] rndTap z[2],z[3] Delay 1500 TracePrint "you at menu already"End IfIf t[3] = 1 Then TracePrint "yoyu at menu3,is going to menu",z[1] rndTap z[2],z[3] Delay 1500 TracePrint "you at menu already"End IfIf t[2] = 1 Then TracePrint "you at menu2,is going to menu",z[1] rndTap z[2],z[3] Delay 1500 TracePrint "you at menu already"End IfEnd Function
Function appdied(apk)//卡死判斷,卡死重啟,附帶返回主頁(yè)面功能,apk放入重啟包名Dim t=array()Dim t1=array()Dim z=array()findmenu t, zIf z[1] = 0 Then Delay 2000 runfront t1, apk Delay 2000 If t1[1] = 1 and t1[2] = 1 Then TracePrint "maybe it died,let's reboot" Delay 2000 重啟app (apk) Delay 8000 End IfEnd IfEnd Function Function reserchaim(reserch,aim)//點(diǎn)擊某處并輸入脑又。reserch傳入輸入框坐標(biāo)暮胧,aim傳入搜索的內(nèi)容 TracePrint"is going to tap inputbox" rndTap reserch[1], reserch[2] Delay 2500 TracePrint"is going to input",aim InputText aim Delay 2500 End FunctionFunction dojob(aim) //做任務(wù)子程序,aim傳入輸入的內(nèi)容 Dim t=array() Dim z=array(1,128,1830) findmenu (t,z) TracePrint t[1],t[2],t[3],t[4] gomenu(t,z) Dim reserch=array(849,123) reserchaim reserch, aim Delay 3000 rndTap 343,400//點(diǎn)擊最常使用 Delay 3000 TracePrint "you are in aim now,is going to do job" Delay 500End Function
Dim menu1=array(0,0,0,0,"61C108-222222","-13|-16|61C108-222222,-25|12|61C108-222222,-18|26|61C108-222222,-5|-40|F7F7F7-222222,88|6|F7F7F7-222222,-4|40|F7F7F7-222222,255|-4|000000-222222,265|-9|F7F7F7-222222,511|-2|000000-222222",0,0.9,1,0,1,1,1,1)Dim menu2=array(0,0,0,0,"61C108-222222","-23|0|61C108-222222,1|-43|61C108-222222,14|-17|F7F7F7-222222,4|10|F7F7F7-222222,247|-24|000000-222222,261|-26|F7F7F7-222222,532|-8|000000-222222,547|-4|F7F7F7-222222",0,0.9,2,0,1,1,1,1)Dim menu3=array( 0,0,0,0,"F7F7F7-222222","-17|6|61C108-222222,0|-15|61C108-222222,-35|-11|F7F7F7-222222,1|34|F7F7F7-222222,27|21|F7F7F7-222222,262|-3|000000-222222,270|-11|F7F7F7-222222,-263|-12|020202-222222,-274|-13|F7F7F7-222222",0,0.9,3,0,1,1,1,1) Dim menu4=array(0,0,0,0,"61C108-222222","2|-41|61C108-222222,-18|2|61C108-222222,-10|-17|F7F7F7-222222,14|-14|F7F7F7-222222,-238|-19|000000-222222,-250|-17|F7F7F7-222222,-533|-25|000000-222222,-539|-34|F7F7F7-222222,-778|-20|000000-222222",0,0.9,4,0,1,1,1,1)
Function readcontent(x,y,i)//x,y傳入新聞所在坐標(biāo),i傳入向下滑動(dòng)500像素的次數(shù) TracePrint "is going to read the content" Delay 1000 rndTap x, y TracePrint"wait for content loading " Delay 10000 For i rndMove 364, 1890, 338, 1390, 1500 Delay 2000 Next TracePrint"read content success" Delay 1000End FunctionFunction job1()//從首頁(yè)到讀完新聞全過(guò)程appdied ("com.tencent.mm")Delay 5000dojob ("騰訊新聞")Delay 3000readcontent(394,1771,3)KeyPress "Back"Delay 3000TracePrint"back to content list"Delay 500readcontent(400,1558,3)KeyPress "Back"Delay 3000TracePrint"back to content list"Delay 500readcontent(408,1367,3)KeyPress "Back"Delay 3000TracePrint"back to content list"Delay 500readcontent(450,1091,3)KeyPress "Back"Delay 3000TracePrint"back to content list"Delay 500TracePrint"read complete"Delay 500End FunctionFunction 勾選執(zhí)行1(a)//a放入任務(wù)序列Dim 多選1多選1 = ReadUIConfig("多選框1")TracePrint ReadUIConfig("多選框1")If 多選1 = True Then job1()Else TracePrint"你沒勾選任務(wù)",aDelay 500End IfEnd Function
Function job2()Dim i=1Dim a=array()Dim b=array()讀取 a, "/sdcard/MobileAnjian/微信號(hào).txt"Delay 2000TracePrint a[i]appdied ("com.tencent.mm")Delay 5000DoIf a[i] = null or a[i] = 0 Then Exit Do End Ifdojob (a[i])Delay 3000//寫打開聊天框之后的程序rndTap 373, 1848Delay 2000讀取 b, "/sdcard/MobileAnjian/消息.txt"Delay 2000TracePrint b[i]Delay 500If b[i] = null or b[i] = 0 Then InputText "hello,how do you do?"Delay 3000Else InputText b[i]Delay 5000End If
rndTap 1013, 1842Delay 2500
i = i + 1LoopEnd FunctionFunction 勾選執(zhí)行2(a)//a放入任務(wù)序列Dim 多選2多選2 = ReadUIConfig("多選框2")TracePrint ReadUIConfig("多選框2")If 多選2 = True Then job2()Else TracePrint"你沒勾選任務(wù)",aDelay 500End IfEnd Function
勾選執(zhí)行1(1)勾選執(zhí)行2(2)///////////////////////////////////////////////////////圖形界面代碼:界面1:{ 功能頁(yè)面: { 多選框: { 注釋:"文字大小问麸、高度往衷、寬度是可選屬性,如需使用默認(rèn)值严卖,可保持值為0或直接刪除此屬性", 名稱:"多選框1", 提示內(nèi)容:"閱讀騰訊新聞", 點(diǎn)擊響應(yīng):"函數(shù)名1", 選中:false, 文字大小:0, 高度:0, 寬度:0 }, 多選框: { 注釋:"文字大小席舍、高度、寬度是可選屬性哮笆,如需使用默認(rèn)值来颤,可保持值為0或直接刪除此屬性", 名稱:"多選框2", 提示內(nèi)容:"發(fā)送消息", 點(diǎn)擊響應(yīng):"函數(shù)名1", 選中:false, 文字大小:0, 高度:0, 寬度:0 }, }, 說(shuō)明頁(yè)面: { 文字框: { 注釋:"文字大小、高度稠肘、寬度是可選屬性福铅,如需使用默認(rèn)值,可保持值為0或直接刪除此屬性", 名稱:"文字框1", 顯示內(nèi)容:"請(qǐng)將微信好友的微信名或者微信號(hào)寫入mobileanjian文件夾下项阴,微信號(hào).txt文檔中滑黔。請(qǐng)將聊天內(nèi)容寫入mobileanjian文件夾下,消息.txt文檔中", 文字大小:0, 高度:0, 寬度:0 }, },
}??
按鍵精靈在微信的看新聞凰盔,回消息代碼
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
- 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)帝嗡,“玉大人晶通,你說(shuō)我怎么就攤上這事∮寸瑁” “怎么了狮辽?”我有些...
- 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)巢寡。 經(jīng)常有香客問我喉脖,道長(zhǎng),這世上最難降的妖魔是什么抑月? 我笑而不...
- 正文 為了忘掉前任树叽,我火速辦了婚禮,結(jié)果婚禮上谦絮,老公的妹妹穿的比我還像新娘题诵。我一直安慰自己,他們只是感情好层皱,可當(dāng)我...
- 文/花漫 我一把揭開白布性锭。 她就那樣靜靜地躺著,像睡著了一般叫胖。 火紅的嫁衣襯著肌膚如雪草冈。 梳的紋絲不亂的頭發(fā)上,一...
- 那天瓮增,我揣著相機(jī)與錄音疲陕,去河邊找鬼。 笑死钉赁,一個(gè)胖子當(dāng)著我的面吹牛蹄殃,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播你踩,決...
- 文/蒼蘭香墨 我猛地睜開眼诅岩,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼讳苦!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起吩谦,我...
- 序言:老撾萬(wàn)榮一對(duì)情侶失蹤鸳谜,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后式廷,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體咐扭,經(jīng)...
- 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
- 正文 我和宋清朗相戀三年滑废,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了蝗肪。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
- 正文 年R本政府宣布,位于F島的核電站腊状,受9級(jí)特大地震影響诱咏,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜缴挖,卻給世界環(huán)境...
- 文/蒙蒙 一胰苏、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧醇疼,春花似錦、人聲如沸法焰。這莊子的主人今日做“春日...
- 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)埃仪。三九已至乙濒,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間卵蛉,已是汗流浹背颁股。 一陣腳步聲響...
- 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像葡缰,于是被迫代替她去往敵國(guó)和親亏掀。 傳聞我的和親對(duì)象是個(gè)殘疾皇子忱反,可洞房花燭夜當(dāng)晚...