-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcatwxw.lua
More file actions
1536 lines (1268 loc) · 41 KB
/
catwxw.lua
File metadata and controls
1536 lines (1268 loc) · 41 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--点赞和评论
function filelike()
msleeprand(1000);
clickarea(346,1050,480,1128);--点击发现
-- ysmsleepaddnmb('王',256,58,397,112,1);
-- clickarea(10,164,630,234);--点击朋友圈
msleeprand(800);
clickarea(10,164,630,234);--点击朋友圈
msleeprand(800); --点击移动
clickmove();
msleeprand(500);
x, y = findImage("/var/touchelf/scripts/scriptfile/images/dz66.bmp"); -- 在全屏范围找到第一个路径为"/mnt/sdcar/a.bmp"的图片, 将其左上角坐标保存到变量x和y中
if x ~= -1 and y ~= -1 then -- 如果找到了
touchDown(0, x, y); -- 点击那个点
touchUp(0);
end
end
--点赞
function dianzan()
filelike();
msleeprand(1000);--点赞
x, y = findImageFuzzy("/var/touchelf/scripts/scriptfile/images/XX.bmp",0x4c5154);
if x ~= -1 and y ~= -1 then
touchDown(0, x+98, y+40); -- 点击那个点
touchUp(0);
-- notifyMessage("msleeprand",3000);
end
msleeprand(1500);
btnlefttop();
end
--评论
function plinfo()
filelike();
msleeprand(1000);--评论
x, y = findImageFuzzy("/var/touchelf/scripts/scriptfile/images/PP.bmp",0x4c5154);
if x ~= -1 and y ~= -1 then -- 如果找到了
touchDown(0, x, y); -- 点击那个点
touchUp(0);
msleeprand(800);
-- os.execute("input text \"asdasd\"");
a = {"666",
"哇/::B",
"好像很厉害的样子",
"长知识了/::d",
"32个赞/::P",
"我差点信了/:dig",
"/::>",
"哈哈哈!/:,@P",
"/:,@P",
"/::B",
}
a_num=math.random(1,#a);
inputText(a[a_num]);
msleeprand(2500);
click(350,1089); --点击键盘空格键
msleeprand(2000);
click(560,1089); --点击发送
end
msleeprand(2000);
btnlefttop();
end
--发送朋友圈
function filesend()
info=runparame();
if info==nil or info=='' then
notifyMessage('没有得到指令',2000);
filesend();
end
fphoparame=getparamecom(info,'mustt_fphoto');
if fphoparame==nil or fphoparame=='' then
notifyMessage('没有得到指令参数',2000);
filesend();
end
--[[返回首页]]
click(25,88);mSleep(300);
click(25,88);mSleep(300);
click(25,88);mSleep(300);
click(25,88);mSleep(300);
click(25,88);mSleep(300);
click(83,1086);
mSleep(800);
--[[返回首页]]
local mobilecode=textlocalnmb(128,224,338,283);
if string.len(mobilecode)>6 then
mobilecode=textlocalnmb(122,317,206,367);
if string.len(mobilecode)>6 then
notifyMessage('设置异常',2000);
return
end
end
notifyMessage(string.gsub(mobilecode," ","").."手机号码");
local runad = math.random(100,100000);
local url="http://g.7gu.cn/index.php?g=api&m=Friends&a=friendnew&id="..getDeviceID().."&mobile="..mobilecode.."&rd="..runad;
while true do
if sendfriendfun(mobilecode,url)==false then
break;
end
mSleep(500);
end
end
--增加好友朋友圈
function addfriendsmsg()
info=runparame();
if info==nil or info=='' then
notifyMessage('没有得到指令',2000);
address();
end
addparame=getparamecom(info,'mustt_adtext');
if addparame==nil or addparame=='' then
addparame='';
end
addnumb=getparamecom(info,'mustt_addnumb');
for i=1,tonumber(addnumb) do
msleeprand(2000);
tc=addfriend(addparame);
if tc==0 then
break;
end
end
end
--发送固定朋友圈
function sendfind()
info=runparame();
if info==nil or info=='' then
notifyMessage('没有得到指令',2000);
filesend();
end
--[[返回首页]]
click(25,88);mSleep(300);
click(25,88);mSleep(300);
click(25,88);mSleep(300);
click(25,88);mSleep(300);
click(25,88);mSleep(300);
click(83,1086);
mSleep(800);
--[[返回首页]]
local url="http://g.7gu.cn/index.php?g=api&m=friends&a=friendone&id="..math.random(1000,100000000);
while true do
if sendfriendfun(mobilecode,url)==false then
break;
end
mSleep(500);
end
end
--发送一个固定朋友
function sendonefind()
info=runparame();
if info==nil or info=='' then
notifyMessage('没有得到指令',2000);
sendonefind();
end
delphoto();
mSleep(1000);
openweixi();
mSleep(2000);
--[[返回首页]]
-- click(25,88);mSleep(300);
-- click(25,88);mSleep(300);
-- click(25,88);mSleep(300);
-- click(25,88);mSleep(300);
-- click(25,88);mSleep(300);
-- click(83,1086);
-- mSleep(800);
--[[返回首页]]
-- mSleep(1200);
local str=getparame(info,'mustt_msginfo');--得到对应的值
mSleep(1000);
dowxtupian(str)--发送一张图片
end
--删除相片
function delphoto()
mSleep(1000);
--openURL("prefs:root=Photos"); .sharing-nowakeMar
--appRun("com.apple.mediastream");
mSleep(1000);
appKill("com.apple.mobileslideshow");
mSleep(1000);
appRun("com.apple.mobileslideshow");
--appRun("com.apple.mediastream.sharing-nowake");
mSleep(1000);
--是否打相册
local numloop = 1;
while true do
local wloop = false;
for sim = 100, 90, -1 do
x, y = findColorInRegionFuzzy(0x007aff, sim, 93, 1068, 131, 1095);
if x ~= -1 and y ~= -1 then --如果在指定区域找到某点符合条件
wloop=true;
break; --并跳出循环
end
end
local wloop1 = false;
for sim = 100, 90, -1 do
x, y = findColorInRegionFuzzy(0x007aff, sim, 15, 58, 126, 123);
if x ~= -1 and y ~= -1 then --如果在指定区域找到某点符合条件
wloop1=true;
break; --并跳出循环
end
end
if wloop1==false then
return;
end
if wloop==true then
break;
end
numloop=numloop+1;
if numloop>50 then
break;
end
mSleep(1000);
click(101,1087);
mSleep(1000);
appKill("com.apple.mobileslideshow");
mSleep(2000);
end
-- mSleep(800);
-- click(591,81);
-- mSleep(1000);
-- click(583,177);
-- mSleep(1000);
-- click(591,1083);
-- mSleep(1000);
-- click(317,975);
--是否打相册
end
--发送一张固定的朋友信息
function dowxtupian(signpyq)
local imgnum=1;
local tpurl="/var/touchelf/scripts/scriptfile/images/setu.png";
if file_exists(tpurl)==false or getparame(gsinfo,'mustt_isfile')==2 or getparame(gsinfo,'mustt_isfile')=='2' then
local path="ftp://121.40.140.16:/script/luaimg/setu.png";
local getdata=ftpGet(path, tpurl, "productconsole", "T4t8u0p1");
if getdata then
notifyMessage("下载成功")
else
dowxtupian();
return;
end
end
saveImageToAlbum(tpurl);
mSleep(1000);
click(400,1077);--点击发现
mSleep(1000);
click(275,200);--点击朋友圈
mSleep(800);
click(589,83);--点击右上角
zdl(); --知道了
mSleep(1000);
click(311,981);--从手机相册选择
mSleep(1000);
click(62,82);--点击返回
mSleep(800);
click(218,190); --第一相册
mSleep(1000);
selectimgasc(1,208,1,0);
mSleep(1500);
click(555,1097);--选好图片点击完成
mSleep(1200);
click(262,164);--点击进入输入框
mSleep(1100);
inputText(signpyq);
mSleep(1600);
click(589,88); --点击发送
mSleep(3000);
click(82,85); --返回发现
end
----检测指定文件是否存在
function file_exists(file_name)
local f = io.open(file_name, "r")
return f ~= nil and f:close()
end
function sendfriendfun(mobilecode,url)
local par= httpGet(url);
if par==nil or apr=="" or getparamecom(par,'status')=="0" then
notifyMessage("请设置微信号朋友圈信息",3000);
return false ;
end
local imgnum=getparamecom(par,'imagnum');
local dxnum = 0;
if tonumber(imgnum)>0 then
notifyMessage("下载图片中");
for i=0,tonumber(imgnum)-1 do
mSleep(1000);
--flag = ftpGet("ftp://192.168.1.100:/a.txt", "/var/touchelf/a.txt", "user", "pass") -- 将FTP服务器192.168.1.100上路径为/a.txt的文件下载到/var/touchelf/a.txt
local imgname=getparamecom(par,'imga'..i);
local path="ftp://121.40.140.16:/script"..imgname;
local savepath="/var/touchelf/scripts/scriptfile/images/tupian"..i..'.'..getparamecom(par,'ximga'..i);
local getdata=ftpGet(path, savepath, "productconsole", "T4t8u0p1");
if getdata then
dxnum=dxnum+1;
end
mSleep(1000);
saveImageToAlbum(savepath);
mSleep(1000);
end
notifyMessage("成功下载图片"..dxnum.."个");
end
msleeprand(1000);
clickarea(346,1050,480,1128);--点击发现
msleeprand(1000);
clickarea(10,164,630,234);--点击朋友圈
if tonumber(imgnum)<=0 then
signpyq=string.gsub(getparamecom(par,'friendtext'),' ','');--去除空格
if signpyq==nil or signpyq=="" or signpyq=="0" then
notifyMessage("请设置微信号朋友圈信息",3000);
return false ;
end
mSleep(1230);
touchDown(2, 630, 54)
mSleep(1600);
touchUp(2)
mSleep(800);
for sim = 100, 90, -1 do --使用 for 循环不断降低精确度(建议精确度不低于50%)
x, y = findColorInRegionFuzzy(0x2e9536, sim, 227, 1009, 414, 1064);
if x ~= -1 and y ~= -1 then --如果在指定区域找到某点符合条件
click(318,1037);
break; --并跳出循环
end
end
mSleep(1000);
inputText(signpyq);
mSleep(2000);
touchDown(0, 589, 83);
mSleep(200);
touchUp(0);
else
msleeprand(800);
clickrand(589,83);--点击右上角
zdl(); --知道了
msleeprand(800);
clickarea(6,940,632,1014);--从手机相册选择
-- ysmsleepaddnmb('回',4,53,131,112,2);
-- local fanhui=textlocal(4,53,131,112);
--if(string.match(fanhui,'回')=='回') then
click(62,82);--点击返回
--end
msleeprand(800);
--if fphoparame=='1' then
click(218,190);
--clickarea(6,130,630,235)
--end
--[[
ysmsleepaddnmb('回',4,53,131,112,2);
local fanhui=textlocal(4,53,131,112);
if(string.match(fanhui,'回')=='回') then
click(62,82);--点击返回
end
msleeprand(1500); --点击相册
if fphoparame=='1' then
clickarea(6,130,630,235)
end
if fphoparame=='2' then
clickarea(6,245,630,350)
end
if fphoparame=='3' then
clickarea(6,360,630,468)
end
if fphoparame=='4' then
clickarea(6,475,630,580)
end
if fphoparame=='5' then
clickarea(6,590,630,698)
end
if fphoparame=='6' then
clickarea(6,706,630,810)
end
if fphoparame=='7' then
clickarea(6,820,630,926)
end
if fphoparame =='8' then
clickarea(6,936,630,1040)
end
--]]
--选择图片
mSleep(1000);
selectimg(tonumber(imgnum),980,1,0);
msleeprand(1500);
clickarea(520,1070,618,1108);--选好图片点击完成
msleeprand(2000);
click(262,164);--点击进入输入框
msleeprand(1500);
signpyq=string.gsub(getparamecom(par,'friendtext'),' ','');--去除空格
inputText(signpyq);
msleeprand(2500);
clickarea(554,62,622,98); --点击发送
end
msleeprand(3000);
btnlefttop();--点击坐上角返回
return true ;
end
--倒序选择图片
function selectimg(num,height,funnum,selecnum)
local count = 3;
for i=1,4 do
mSleep(200);
click((count*158)+80,height);
count = count - 1;
mSleep(500);
local tm = 0;
for sim = 100, 85, -1 do --使用 for 循环不断降低精确度(建议精确度不低于50%)
x, y = findColorInRegionFuzzy(0x373738, sim, 169, 1067, 410, 1130);
if x ~= -1 and y ~= -1 then --如果在指定区域找到某点符合条件
tm=1;
break; --并跳出循环
end
end
if tm==1 then
mSleep(500);
click(580,62);
mSleep(1000);
click(46,64);
selecnum=selecnum+1;
if selecnum>=num then
break;
end
end
mSleep(1000);
end
if selecnum<num then
funnum=funnum+1;
selectimg(num,height-150,funnum,selecnum);
end
end
--按顺序选择图片
function selectimgasc(num,height,funnum,selecnum)
local count = 0;
for i=1,4 do
mSleep(200);
click((count*158)+80,height);
count = count + 1;
mSleep(500);
local tm = 0;
for sim = 100, 85, -1 do --使用 for 循环不断降低精确度(建议精确度不低于50%)
x, y = findColorInRegionFuzzy(0x373738, sim, 169, 1067, 410, 1130);
if x ~= -1 and y ~= -1 then --如果在指定区域找到某点符合条件
tm=1;
break; --并跳出循环
end
end
if tm==1 then
mSleep(500);
click(580,62);
mSleep(1000);
click(46,64);
selecnum=selecnum+1;
if selecnum>=num then
break;
end
end
mSleep(1000);
end
if selecnum<num then
funnum=funnum+1;
selectimg(num,height+150,funnum,selecnum);
end
end
--头像设置
function friendmi()
delphoto();
local tpurl="/var/touchelf/scripts/scriptfile/images/tx1.png";
local poto=getparamecom(gsinfo,"mustt_poto");
if file_exists(tpurl)==false or poto=='2' or poto==2 then
local path="ftp://121.40.140.16:/script/luaimg/tx1.png";
local getdata=ftpGet(path, tpurl, "productconsole", "T4t8u0p1");
if getdata then
notifyMessage("下载成功")
else
friendmi();
return;
end
end
saveImageToAlbum(tpurl);--把图片放进相册
mSleep(1000);
if findseachcolor(0x1aad19,548,1062,578,1097,80)==false then
openweixi();
end
mSleep(1600);
click(560,1083); --点击我
mSleep(800);
click(200,247);--点击头部栏信息
mSleep(1000);
click(226,239);--点击头像
mSleep(2000);
click(590,85);--三点
mSleep(800);
zdl();--知道了
mSleep(800);
click(308,885);--从手机相册选择
mSleep(800);
click(62,82);--点击返回
mSleep(800);
click(218,190); --第一个相册
mSleep(1000);
selectimgasc(1,208,1,0);
mSleep(1200);
click(542,1091);--选好图片点击完成
mSleep(1500);
click(86,86);--返回个人信息
mSleep(800);
click(55,83);--返回我
end
--设置朋友圈照片
function friend()
delphoto();
local tpurl="/var/touchelf/scripts/scriptfile/images/bj.jpg";
pypoto=getparamecom(gsinfo,'mustt_pypoto');
if file_exists(tpurl)==false or pypoto=='2' then
local path="ftp://121.40.140.16:/script/luaimg/bj.jpg";
local getdata=ftpGet(path, tpurl, "productconsole", "T4t8u0p1");
if getdata then
notifyMessage("下载成功")
else
friendmi();
return;
end
end
saveImageToAlbum(tpurl);
mSleep(1000);
openweixi();
mSleep(1600);
click(400,1076);--点击发现
mSleep(1000);
click(248,203);--点击朋友圈
mSleep(1000);
click(328,365);--轻触设置相册封面
mSleep(1200);
click(323,978);--点击更改相册封面
mSleep(1200);
click(280,203);--从手机相册选择
mSleep(800);
click(80,82);--点击返回
mSleep(800);
click(218,190);--第一个相册
mSleep(1000);
selectimgasc(1,208,1,0);
mSleep(1200);
click(542,1091);--选好图片点击完成
mSleep(1200);
click(80,85);--返回点发现
end
--个性签名
function runame()
-- os.execute("su mobile -c uicache");--清空缓存
-- local signstr=httpGet("http://g.7gu.cn/index.php?g=api&m=Wxwapi&a=sign");
-- if signstr==nil or signstr=='' or signstr=='0' then
-- notifyMessage('网络已断开!无法得到数据',2000);
-- return;
-- end
mSleep(1000);
openweixi();
mSleep(1600);
click(560,1083); --点击我
mSleep(800);
click(200,247);--点击头部栏信息
mSleep(1000);
click(278,910);--点击个性签名
-- click(560,287);--点击进入输入框
str="\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
-- inputText(str);
-- mSleep(2000);
-- signstr="看我朋友圈,别怪我没有告诉你";
mSleep(2100);
inputText(str.."看我朋友圈,别怪我没有告诉你");
mSleep(3000);
click(589,85); --点击完成
mSleep(1200);
click(55,83);--返回我
end
-- --添加通讯录
-- function address()
-- str="\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
-- for i=1,3 do
-- msleeprand(2000);
-- clickrand(590,80); --点击+号添加
-- msleeprand(2000);
-- clickrand(140,484);--点击添加电话
-- msleeprand(2000);
-- clickrand(275,485);--点击进入输入框
-- -- notifyMessage('adsad');
-- mobile=friendmobile();
-- notifyMessage(mobile,2000);
-- inputText(str..mobile);
-- msleeprand(3000);
-- clickrand(590,86);--点击完成
-- msleeprand(3000);
-- clickrand(120,80);--点击所有联系人
-- end
-- end
function frinedinfo(addparame)
friendtext=addparame;
if string.len(friendtext)>0 then--是否自定义申请增加微信信息
msleeprand(1000);
str="\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
inputText(str..friendtext);
msleeprand(1000);
end
friendvt=textlocal(205,55,499,114);
if string.match(friendvt,'朋友')=='朋友' then
end
btnrighttop();--发送信息
msleeprand(3000);
end
function address() --添加通讯录
info=runparame();
if info==nil or info=='' then
notifyMessage('没有得到指令',2000);
address();
end
openweixi();--打开微信
addparame=getparamecom(info,'mustt_adtext');
if addparame==nil or addparame=='' then
addparame='';
end
addnumb=getparamecom(info,'mustt_addnumb');
for i=1,tonumber(addnumb) do
msleeprand(2000);
tc=addfriend(addparame);
if tc==0 then
break;
end
end
end
--指定添加某人
function addressone()
info=runparame();
if info==nil or info=='' then
notifyMessage('没有得到指令',2000);
address();
end
addparame=getparamecom(gsinfo,'mustt_grname');
if addparame==nil or addparame=='' then
addparame='';
end
msleeprand(1000);
clickarea(26,152,535,187);--点击搜索框
msleeprand(1000);
seachfrinedcodeone(addparame);
end
--增加朋友
function addfriend(addparame)
clickrand(236,1085);--点击通讯录
msleeprand(1000);
clickrand(196,172);--点击搜索框
msleeprand(1000);
m=seachfrinedcode(addparame);
if m==0 then
return 0;
else
return 1;
end
end
--搜索朋友
function seachfrinedcode(addparame)
friendsex = '关闭';
str="\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
local mobile=friendmobile();
if mobile==0 or mobile==nil then
notifyMessage('没有手机号码',1000);
return;
end
mobile = getparame(mobile,"mobile");
clickrand(296,82);
msleeprand(1000);
inputText(str..mobile);
msleeprand(1000);
click(479,226);--搜索
msleeprand(2000);
myjg=textlocal(136,397,472,467);
if string.match(myjg,'无结果')=='无结果' then
msleeprand(1000);
seachfrinedcode(addparame);
return 1;
end
msgfr=textlocal(89,470,557,683);
if string.match(msgfr,'不存在')=='不存在' then
--friendmobiletypeset(mobile,1);
clickrand(320,653);
msleeprand(200);
seachfrinedcode(addparame);
return 1;
end
msgfr=textlocal(89,470,557,683);
if string.match(msgfr,'失败')=='失败' then
if string.match(msgfr,'过于')=='过于' then
clickrand(320,653);
msleeprand(1000);
btnrighttop();--取消
msleeprand(2000);
btnlefttop();--返回
return 0;
end
clickrand(320,653);
msleeprand(1000);
seachfrinedcode(addparame);
return 1;
--btnrighttop();--取消
--msleeprand(2000);
end
--微信账号因登录环境异常,已被限制登录
msgtbt=textlocal(89,470,557,683);
if string.match(msgtbt,'可申')=='可申' then
click(185,683);
msleep(1000);
return 0;
end
findtext=textlocal(121,388,515,475);
if string.match(findtext,'田')=='田' then
notifyMessage('没有找着');
seachfrinedcode(addparame);
end
local ifv = seachcolorreturn(0xf37e7d,169,173,635,316);
if ifv==1 and friendsex=='女' then
notifyMessage("dsfdsf");
seachcolor(0x1aad19,6,394,637,1037);--增加到通讯录 按颜色查找通讯录
-- clickrand(374,734);--
msleeprand(1500);
frinedinfo(addparame);
end
if ifv==0 and friendsex=='男' then
notifyMessage("dsfdsf");
seachcolor(0x1aad19,6,394,637,1037);--增加到通讯录 按颜色查找通讯录
--clickrand(374,734);--
msleeprand(1500);
frinedinfo(addparame);
end
if friendsex=='关闭' then
seachcolor(0x1aad19,6,394,637,1037);--增加到通讯录 按颜色查找通讯录
-- clickrand(374,734);--
msleeprand(1500);
frinedinfo(addparame);
end
btnlefttop();--返回
msleeprand(1000);
btnrighttop();--取消
msleeprand(1000);
btnlefttop();--返回
return 1;
--seachfrinedcode();
end
--搜索朋友
function seachfrinedcodeone(mobileone)
friendsex = "男";
str="\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
local mobile=mobileone;
if mobile==0 or mobile==nil then
notifyMessage('没有手机号码',1000);
return;
end
mobile=string.sub(mobile,1,11);
clickrand(296,79);
mSleep(500);
inputText(str..mobile);
msleeprand(1000);
clickarea(29,211,608,311);--搜索
msleeprand(2000);
myjg=textlocal(136,397,472,467);
if string.match(myjg,'无结果')=='无结果' then
msleeprand(1000);
seachfrinedcode(mobileone);
return 1;
end
msgfr=textlocal(89,470,557,683);
if string.match(msgfr,'失败')=='失败' then
if string.match(msgfr,'过于')=='过于' then
clickrand(320,653);
msleeprand(1000);
btnrighttop();--取消
msleeprand(2000);
btnlefttop();--返回
return 0;
end
clickrand(320,653);
msleeprand(1000);
seachfrinedcode(mobileone);
return 1;
--btnrighttop();--取消
--msleeprand(2000);
end
findtext=textlocal(121,388,515,475);
if string.match(findtext,'田')=='田' then
notifyMessage('没有找着');
seachfrinedcode(mobileone);
end
local ifv = seachcolorreturn(0xf37e7d,169,173,635,316);
notifyMessage(ifv,2000);
if ifv==1 and friendsex=='女' then
seachcolor(0x1aad19,6,394,637,1037);--增加到通讯录 按颜色查找通讯录
-- clickrand(374,734);--
msleeprand(1500);
frinedinfo(mobileone);
end
if ifv==0 and friendsex=='男' then
seachcolor(0x1aad19,6,394,637,1037);--增加到通讯录 按颜色查找通讯录
-- clickrand(374,734);--
msleeprand(1500);
frinedinfo(mobileone);
end
if friendsex=='关闭' then
seachcolor(0x1aad19,6,394,637,1037);--增加到通讯录 按颜色查找通讯录
-- clickrand(374,734);--
msleeprand(1500);
frinedinfo(mobileone);
end
btnlefttop();--返回
msleeprand(800);
btnrighttop();--取消
msleeprand(800);
btnlefttop();--返回
return 1;
--seachfrinedcode();
end
--修改名字
function finame()
mSleep(1000);
openweixi();
mSleep(1200);
click(559,1080);--点击我
mSleep(1000);
click(217,247);--点击头部信息
mSleep(1000);
click(217,367);--点击个人信息下的名字
str="\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
mSleep(1200);
inputText(str.."晓婷");
-- wxn=getweixiname();
-- inputText(wxn);
mSleep(1200);
click(589,1097); --右下角完成