当前位置:网站首页>[Lua program to control the mobile phone to chat] - it is used to keep the number. You can put down your hand for automatic chat and keep the number
[Lua program to control the mobile phone to chat] - it is used to keep the number. You can put down your hand for automatic chat and keep the number
2022-04-22 01:44:00 【Koki】
Point a favor and leave a note !!!
This code is very simple today , understand lua Paste and copy directly

lua Official website : Touch the official website of the wizard - Better use of mobile automation AIDS
lua Developer manual :Introduction · Touch wizard Development Manual
The mobile phone needs to be installed first Touch the spirit Computers should also be installed ( Remember, you need to spend money to activate )
Get ready :
The mobile phone must be Xiaomi mobile phone
Note the friends of wechat as national and top
Because the video will reveal privacy , I won't play the video ( Company equipment ), You know
Code up
function BJ_quanguoXIN() -- Send messages across the country - Don't stop, don't stop No reply will be sent across the country , Prevent sealing
local T = 0 -- Reaching a certain value will start again Cannot find
local O = 0 -- Reaching a certain value will start again Used to repeat
local Y = 1 -- loop
mSleep(3000); -- Delay 0.5 second
-- Detect wechat main interface
local x,y = findMultiColorInRegionFuzzy( 0x767676, "6|-7|0x767676,4|-2|0x767676,5|-2|0x9d9d9d,15|2|0x9e9e9e,16|1|0x9d9d9d,21|5|0x545454,17|10|0x9d9d9d,16|11|0x838383,17|14|0x909090", 90, 0, 0, 719, 125)
-- testing WeChat main interface
local x1,y1 = findMultiColorInRegionFuzzy( 0x767676, "0|1|0xadadad,1|3|0x545454,8|16|0x838383,6|22|0x9d9d9d,7|22|0x6a6a6a,24|22|0xbdbdbd,18|13|0x767676,22|16|0x838383,23|13|0x909090", 90, 0, 0, 719, 125)
if (x ~= -1 and y ~= -1) or (x1 ~= -1 and y1 ~= -1) then -- Check whether the current page has WeChat or WeChat
toast(" It is already the main interface 1",1); -- Copy printing
tap(362,90,0) -- Back to the top
tap(362,90,0)
tap(362,90,0)
mSleep(3000); -- Delay 0.5 second
while Y == 1 do
if T == 3 or O == 13 then
tap(362,90,0) -- Back to the top
tap(362,90,0)
tap(362,90,0)
mSleep(3000); -- Delay 0.5 second
T = T - T
O = O - O
end
mSleep(7000); -- Delay 0.5 second
local x2,y2 = findMultiColorInRegionFuzzy( 0x969696, "1|2|0xc5c5c5,3|1|0x7b7b7b,5|1|0x6e6e6e,23|0|0xa4a4a4,15|-7|0x575757,16|-9|0x969696,26|1|0x414141,48|5|0x898989,51|8|0x898989", 90, 0, 0, 719, 1279)
if x2 ~= -1 and y2 ~= -1 then -- Testing the whole country
toast(" Find the whole country 2",1); -- Copy printing
mSleep(500); -- Delay 0.5 second
tap(x2,y2,0)
mSleep(5000); -- Delay 0.5 second
local x4,y4 = findMultiColorInRegionFuzzy( 0x2b2b2b, "0|1|0x9d9d9d,2|2|0x838383,1|2|0x6a6a6a,24|2|0xededed,24|1|0xbdbdbd,26|2|0xadadad,48|4|0x909090,49|4|0x2b2b2b,50|8|0x545454", 90, 0, 0, 719, 1279)
if x4 ~= -1 and y4 ~= -1 then -- Test the top of the country
toast(" Confirm that it is the National 3",1); -- Copy printing
mSleep(2000); -- Delay 0.5 second
local x6,y6 = findMultiColorInRegionFuzzy( 0x73dca5, "-49|-23|0x07c160,-47|22|0x07c160,44|-16|0x07c160,43|20|0x07c160,-18|-3|0x90e3b8,-8|-6|0x9de6c0,-6|1|0x77dda8,17|3|0x84e0b0,18|4|0x92e4b9", 90, 0, 0, 719, 1279)
if x6 ~= -1 and y6 ~= -1 then -- Check whether the button is green , If yes, it indicates that there is text residue
tap(x6,y6,0)
else
toast(" No text remains 8",1); -- Copy printing
end
mSleep(4000); -- Delay 0.5 second
local x3,y3 = findMultiColorInRegionFuzzy( 0xededed, "0|60|0xededed,0|120|0xededed,0|180|0xededed,0|240|0xededed,0|300|0xededed,0|360|0xededed,0|420|0xededed,0|480|0xededed,0|540|0xededed", 90, 54, 136, 56, 678)
local x33,y33 = findMultiColorInRegionFuzzy( 0xededed, "0|60|0xededed,0|120|0xededed,0|180|0xededed,0|240|0xededed,0|300|0xededed,0|360|0xededed,0|410|0xededed,0|456|0xededed,0|476|0xededed", 90, 54, 677, 56, 1155)
if x3 ~= -1 and y3 ~= -1 and x33 ~= -1 and y33 ~= -1 then -- Check whether the other party has sent a message If no message has been sent, exit
toast(" No information 4",1); -- Copy printing
mSleep(400); -- Delay 0.5 second
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
moveTo(x2,y2,x2,96,10);-- Slide down , Stable
mSleep(2000); -- Delay 0.5 second
O = O + 1
else
toast(" There is information 6",1); -- Copy printing
mSleep(2000); -- Delay 0.5 second
math.randomseed(getRndNum()) -- Random seed initializes true random number
UU = math.random(1, 4) -- Pick one at random 1 - 4 Number between
local x5,y5 = findMultiColorInRegionFuzzy( 0xff894a, "6|0|0xff783a,7|11|0x61554d,9|11|0x938c87,16|11|0xaa7460,17|12|0xf5bca7,19|12|0xfd7143,20|12|0xf3e8e3,20|10|0xfd6739,20|7|0xfba679", 90, 0, 0, 719, 1279)
if x5 ~= -1 and y5 ~= -1 then -- Detect the presence of elves If it exists, it means that the input box has been opened
toast(" Input method is turned on 7",1); -- Copy printing
for q=1,UU,1 do
mSleep(2000); -- Delay 0.5 second
tap(x5,y5,0) -- Click on the elf
mSleep(2000); -- Delay 0.5 second
tap(x5,y5,0) -- Click on the elf
mSleep(2000); -- Delay 0.5 second
tap(559,742,0) -- Click copywriting
mSleep(2000); -- Delay 0.5 second
local x7,y7 = findMultiColorInRegionFuzzy( 0x73dca5, "-49|-23|0x07c160,-47|22|0x07c160,44|-16|0x07c160,43|20|0x07c160,-18|-3|0x90e3b8,-8|-6|0x9de6c0,-6|1|0x77dda8,17|3|0x84e0b0,18|4|0x92e4b9", 90, 0, 0, 719, 1279)
if x7 ~= -1 and y7 ~= -1 then -- Detect the send button
tap(x7,y7,0)
end
end
mSleep(2000); -- Delay 0.5 second
tap(670,92,1)
mSleep(2000); -- Delay 0.5 second
tap(670,92,1)
mSleep(3000); -- Delay 0.5 second
local x10,y10 = findMultiColorInRegionFuzzy( 0x5f5f5f, "1|1|0x9d9d9d,4|4|0x555555,5|4|0x9e9e9e,4|10|0x6a6a6a,5|13|0x9d9d9d,10|16|0x606060,11|17|0x9d9d9d,12|17|0x3e3e3e,15|16|0x838383", 90, 0, 0, 719, 150)
if x10 ~= -1 and y10 ~= -1 then -- Check the top chat message
tap(74,237,1) -- Take a picture
tap(74,237,1)
tap(74,237,1)
mSleep(4000); -- Delay 0.5 second
local x11,y11 = findMultiColorInRegionFuzzy( 0x4cc284, "0|-4|0x65c994,-2|-4|0x70cd9c,-3|-4|0x5bc68e,-5|-4|0xa3dbbe,2|-7|0xdfede5,4|-7|0x8fd5b0,13|9|0x60c891,7|6|0x95d7b5,14|12|0x7cd0a4", 90, 0, 0, 719, 1279)
if x11 ~= -1 and y11 ~= -1 then -- Check the green button I got it!
tap(x11,y11,1)
else
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
end
end
mSleep(3000); -- Delay 0.5 second
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
moveTo(x2,y2,x2,96,10);-- Slide down , Stable
mSleep(2000); -- Delay 0.5 second
O = O + 1
else
tap(379,1229,0) -- Open the input box
mSleep(3000); -- Delay 0.5 second
math.randomseed(getRndNum()) -- Random seed initializes true random number
II = math.random(1, 4) -- Pick one at random 1 - 4 Number between
local x8,y8 = findMultiColorInRegionFuzzy( 0xff894a, "6|0|0xff783a,7|11|0x61554d,9|11|0x938c87,16|11|0xaa7460,17|12|0xf5bca7,19|12|0xfd7143,20|12|0xf3e8e3,20|10|0xfd6739,20|7|0xfba679", 90, 0, 0, 719, 1279)
if x8 ~= -1 and y8 ~= -1 then -- Detect the presence of elves If it exists, it means that the input box has been opened
toast(" Input method is turned on 7",1); -- Copy printing
for w=1,II,1 do
mSleep(2000); -- Delay 0.5 second
tap(x8,y8,0) -- Click on the elf
mSleep(2000); -- Delay 0.5 second
tap(x8,y8,0) -- Click on the elf
mSleep(2000); -- Delay 0.5 second
tap(559,742,0) -- Click copywriting
mSleep(2000); -- Delay 0.5 second
local x9,y9 = findMultiColorInRegionFuzzy( 0x73dca5, "-49|-23|0x07c160,-47|22|0x07c160,44|-16|0x07c160,43|20|0x07c160,-18|-3|0x90e3b8,-8|-6|0x9de6c0,-6|1|0x77dda8,17|3|0x84e0b0,18|4|0x92e4b9", 90, 0, 0, 719, 1279)
if x9 ~= -1 and y9 ~= -1 then -- Detect the send button
tap(x9,y9,0)
end
end
mSleep(2000); -- Delay 0.5 second
tap(670,92,1)
mSleep(2000); -- Delay 0.5 second
tap(670,92,1)
mSleep(3000); -- Delay 0.5 second
local x10,y10 = findMultiColorInRegionFuzzy( 0x5f5f5f, "1|1|0x9d9d9d,4|4|0x555555,5|4|0x9e9e9e,4|10|0x6a6a6a,5|13|0x9d9d9d,10|16|0x606060,11|17|0x9d9d9d,12|17|0x3e3e3e,15|16|0x838383", 90, 0, 0, 719, 150)
if x10 ~= -1 and y10 ~= -1 then -- Check the top chat message
tap(74,237,1) -- Take a picture
tap(74,237,1)
tap(74,237,1)
mSleep(4000); -- Delay 0.5 second
local x11,y11 = findMultiColorInRegionFuzzy( 0x4cc284, "0|-4|0x65c994,-2|-4|0x70cd9c,-3|-4|0x5bc68e,-5|-4|0xa3dbbe,2|-7|0xdfede5,4|-7|0x8fd5b0,13|9|0x60c891,7|6|0x95d7b5,14|12|0x7cd0a4", 90, 0, 0, 719, 1279)
if x11 ~= -1 and y11 ~= -1 then -- Check the green button I got it!
tap(x11,y11,1)
else
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
end
end
mSleep(3000); -- Delay 0.5 second
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
moveTo(x2,y2,x2,96,10);-- Slide down , Stable
mSleep(2000); -- Delay 0.5 second
O = O + 1
else
tap(379,1229,0) -- Open the input box
mSleep(3000); -- Delay 0.5 second
end
end
end
else
toast(" Not the whole country 5",1); -- Copy printing
mSleep(1000); -- Delay 0.5 second
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
moveTo(x2,y2,x2,96,10);-- Slide down , Stable
mSleep(2000); -- Delay 0.5 second
end
else
mSleep(2000); -- Delay 0.5 second
-- Detect wechat main interface
local x12,y12 = findMultiColorInRegionFuzzy( 0x767676, "6|-7|0x767676,4|-2|0x767676,5|-2|0x9d9d9d,15|2|0x9e9e9e,16|1|0x9d9d9d,21|5|0x545454,17|10|0x9d9d9d,16|11|0x838383,17|14|0x909090", 90, 0, 0, 719, 125)
-- testing WeChat main interface
local x13,y13 = findMultiColorInRegionFuzzy( 0x767676, "0|1|0xadadad,1|3|0x545454,8|16|0x838383,6|22|0x9d9d9d,7|22|0x6a6a6a,24|22|0xbdbdbd,18|13|0x767676,22|16|0x838383,23|13|0x909090", 90, 0, 0, 719, 125)
if (x12 ~= -1 and y12 ~= -2) or (x13 ~= -1 and y13 ~= -2) then -- Check whether it is on the wechat main interface
toast(" Not in the main interface Execute exit ",1); -- Copy printing
tap(29,90,0) -- sign out
mSleep(2000); -- Delay 0.5 second
else
moveTo(320,940,321,400,60);-- Slide down , unstable
mSleep(3000); -- Delay 0.5 second
T = T + 1
end
end
end
else
toast(" Not the main interface 4",1); -- Copy printing
mSleep(400); -- Delay 0.5 second
end
end
版权声明
本文为[Koki]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220140356674.html
边栏推荐
- Webrtc video cannot be played. How to add UDP hole drilling program in easycvr?
- net easy
- 代码源每日一题 div1 (401-407)
- 【shell】训练小脚本(不定时更新)
- Rancher installation and deployment
- What do you know about the ADB order in 2022? A 2000 word detailed ADB command is coming
- C语言课程设计
- 播放量超2000w,这些高能恰饭视频为什么能被B站用户“反复观看”?
- Automatic multiorgan segmentation in thorax CT images using U-net-GAN
- [shell] training script (updated from time to time)
猜你喜欢

Economist translation exercise 4.16 Journal - IRS

BSides-Vancouver-2018-Workshop靶机渗透测试

Valley rain of 24 solar terms

MySQL realizes master-slave replication / master-slave synchronization
![[PRANET] thesis and code interpretation (RFB and aggregation) - cavy LAN](/img/58/de9e7290c5ef9ed970acf69ed9882a.png)
[PRANET] thesis and code interpretation (RFB and aggregation) - cavy LAN

互联网使用代理IP有哪些作用?

二十四节气之谷雨

How to call the login, playback address and video playback interface of easycvr platform?

Ali expert original, self-taught programming, looking for a job

bluemoon靶机渗透测试
随机推荐
深入理解.Net中的线程同步之构造模式(一)用户模式构造
B站充电|单周充电超1500,银发UP主成B站新黑马?
In 2022, crud alone can't meet the interview and upgrading notes of large factories in spring recruitment
Network protocol analysis summary
Alibaba Daniel teaches you to write your own Android third-party library. The latest Alibaba Android interview process in 2021
DVWA系列——XSS(跨站脚本注入(反射型,储存型,DOM))
Flash basic code
The rainbow in the sky is beautiful
What are the good products of gold insurance in 2022?
Appium移动端自动化测试--搭建模拟器和真机环境一
Code source daily question div1 (201-207)
Can SQL server remotely manipulate a set procedure or function and return results without using account login?
Point cloud segmentation task notes
Ali expert original, self-taught programming, looking for a job
How to call the login, playback address and video playback interface of easycvr platform?
Memory leak caused by C UserControl
bluemoon靶机渗透测试
VMware虚拟机安装详细教程网络NAT、网桥配置
多屏幕模式下idea窗口找不到
Oracle 在视图对象中看不见视图,但用select语句可查询到视图数据