Autojs WeChat Research: The final product of the WeChat automatic messaging robot (with effect demonstration)

Table of contents

Effect animation

Log information output

Function brief description

Project structure

Summarize


Long time no see. All the company’s related requirements have been completed and the test is running stably. You can see the renderings below.

Effect animation

Log information output

14:12:07.025/V: 开始运行[/storage/emulated/0/脚本/微信自动化消息发送/WXNewsMain.js]
14:12:07.123/D: 启动脚本
14:12:07.381/D: 脚本路径:/storage/emulated/0/脚本/微信自动化消息发送
14:12:18.695/D: 兼容微信启动:true
14:12:20.216/D: 通讯录:点击兼容pro版本:true
14:12:20.905/D: 通讯录:点击兼容pro版本:true
14:12:21.568/D: 通讯录:点击兼容pro版本:true
14:12:21.568/D: 检查并成功进入通讯录主界面
14:12:21.734/D: 群聊:点击兼容pro版本:true
14:12:23.194/D: 微信机器人群:点击兼容pro版本:true
14:12:23.194/D: 接口URL:http://192.168.168.28:8080/api/values/510300-自贡市,510400-攀枝花市,511900-巴中/2
14:12:32.358/D: [微信机器人群]群发送完毕
14:12:32.759/D: 兼容微信启动:true
14:12:34.249/D: 通讯录:点击兼容pro版本:true
14:12:34.936/D: 通讯录:点击兼容pro版本:true
14:12:35.600/D: 通讯录:点击兼容pro版本:true
14:12:35.600/D: 检查并成功进入通讯录主界面
14:12:35.765/D: 群聊:点击兼容pro版本:true
14:12:37.226/D: 机器人群聊2:点击兼容pro版本:true
14:12:37.226/D: 接口URL:http://192.168.168.28:8080/api/values/510300-自贡市,510400-攀枝花市,511900-巴中/2
14:12:46.421/D: [机器人群聊2]群发送完毕
14:12:46.859/D: 兼容微信启动:true
14:12:48.345/D: 通讯录:点击兼容pro版本:true
14:12:49.033/D: 通讯录:点击兼容pro版本:true
14:12:49.697/D: 检查并成功进入通讯录主界面
14:12:49.696/D: 通讯录:点击兼容pro版本:true
14:12:49.862/D: 群聊:点击兼容pro版本:true
14:12:51.320/D: 接口URL:http://192.168.168.28:8080/api/values/510300-自贡市,510400-攀枝花市,511900-巴中/2
14:12:51.320/D: 政务中心:点击兼容pro版本:true
14:13:00.439/D: [政务中心]群发送完毕
14:13:00.440/D: *** 所有群发送完毕 ***

Function brief description

  • Start WeChat and find the designated group chat interface;
  • Messages returned by multi-group sending interface;
  • Dynamically configure related content and save configuration information;
  • Upgrade function modules;
  • Ensure the stability of long-term operation of the equipment and support regular restart of the equipment every week;
  • The specified script program will be automatically started after the device is turned on;
  • Various individual function checking modules;
  • Retry mechanism for various click operations;
  • Reset and other functions;

Project structure

Summarize

It took about 3 weeks in total from learning autojs to developing the finished small project. It was also the first time to use the vscode tool and learn the JavaScript scripting language. I personally feel that the debugging speed of this scripting language is very fast compared to Java.

Uncomfortable places to write autojs4.1.1:

  • It is very difficult to find problems if the code is wrong;
  • Many of the native vscode APIs are not complete, and most of them are hard-keyed; (the problem is the same with the APIs related to auto4.1.1)
  • There are also some compatibility issues between auto and js, causing the code to be written correctly but actually running is blocked and no error is reported;

In general, it is very fast to understand and learn autojs when it comes to Android native development. You can basically write projects while learning.

The first phase of the company's project has been written. I don't know if there will be any auto-related projects later. If not, I may not update auto-related articles for a long, long, long time. I recently wanted to learn server back-end development, so I happened to learn the JavaScript language and planned to learn node.js back-end development.

Just watching and typing is useless
After reading, you must practice it
You must type the code
Be sure to run trial and error
This is meaningful learning

Guess you like

Origin blog.csdn.net/piyangbo/article/details/125891114