Auto.JS

介绍

Auto.JS简介与教程
https://www.jianshu.com/p/4602db0618df

B站教程
https://space.bilibili.com/21486893/video

环境搭建

手机安装:
Auto.js 4.1.0:https://cuishuohao.lanzoui.com/iFj24n9g8ab
Auto.js打包插件:https://cuishuohao.lanzoui.com/iugZ5n9g83e
Auto.js Pro(仅备用):https://cuishuohao.lanzoui.com/iXd62n9g8ta
电脑vscode插件:
https://github.com/hyb1996/Auto.js-VSCode-Extension

打开服务:        Ctrl+Shift+P:Auto.js: StartServer
保存Js到手机:  Ctrl+Shift+P:Auto.js: Save On Device
在手机上运行: F5

手机需要权限

进入开发者模式(小米note3):我的设备–全部参数–MIUI版本,连续点击

无障碍服务
悬浮窗

安装Auto.JS APK:在手机上安装Auto.js_V4.1.1_Alpha2
注:App会自动引导开启“无障碍服务”。以小米为例,按程序指示,在程序跳转到的页面点击“更多已下载的服务”->“Auto.js”->开启服务

参考:https://zhuanlan.zhihu.com/p/90065914

小米(以红米note9为例)
无障碍服务:
设置–更多设置–无障碍–已下载的服务–Auto.js–开启服务
悬浮窗:
设置–应用设置–授权管理–应用权限管理–Auto.js–显示悬浮窗–始终允许

魅族(以魅蓝note5为例)
无障碍服务:
设置–辅助功能–无障碍–服务–Auto.js–开启
悬浮窗:
设置–应用管理–应用权限–Auto.js–悬浮窗–开启

代码

参考:
https://www.jb51.net/article/186148.htm

官方文档:
https://hyb1996.github.io/AutoJs-Docs/#/?id=%e7%bb%bc%e8%bf%b0

swipe滑动文档:
https://hyb1996.github.io/AutoJs-Docs/#/coordinatesBasedAutomation?id=swipex1-y1-x2-y2-duration