当前位置:网站首页>APP application related instructions in Auto.js
APP application related instructions in Auto.js
2022-08-10 20:56:00 【aiguangyuan】
1. APP version command
1. The current application version number;
app.versionCode
2. The name of the current application version;
app.versionName
3. The current Auto.js version number;
app.autojs.versionCode
4. The name of the current Auto.js version;
app.autojs.versionName
2. Command to open APP
1. Open the app by the app name;
app.launch(appName)
This function can also be used as a global function:
launch(appName)
2. Open the APP through the APP package name;
app.launchPackage(packageName)
This function can also be used as a global function:
launch(packageName)
3. Get the name of the installed application corresponding to the application package name, and return null if the application cannot be found;
app.getAppName(packageName)
This function can also be used as a global function:
getAppName(packageName)
4. Get the package name of the installed application corresponding to the application name, if the application cannot be found, return null, if the name corresponds to multiple applications, only return the package name of one of them;
app.getPackageName(appName)
This function can also be used as a global function:
getPackageName(appName)
3. View and edit files
1. Use other applications to view the file, if the file does not exist, it will be handled by the application viewing the file;
app.viewFile(path)
2. Use other applications to edit the file, if the file does not exist, it will be processed by the application that edited the file;
app.editFile(path)
4. APP installation and uninstallation
1. Uninstall the app. After execution, a prompt box to uninstall the app will pop up.If the application of the package name is not installed, it will be processed by the application uninstaller, and a prompt "application not found" may pop up;
app.uninstall(packageName)
2. Install the application;
app.viewFile(apkPath)
5. Different jump methods
1. Open the application information interface of the application, if the application cannot be found, return false, otherwise return true;
app.openAppSetting(packageName)
This function can also be used as a global function:
openAppSetting(packageName)
2. Start the specific interface of Auto.js, if the function runs in Auto.js, it will open the interface in Auto.js, and if it runs in the packaged application, it will open the corresponding interface of the packaged application;
app.startActivity(name)
The value of name has the following two options:
(1). Log interface: console;
(2). Setting interface: settings;
3. Open the link with the default browser;
app.openUrl(url)
4. Automatically send emails;
app.sendEmail(options)
options is an object, that is, parameters for sending emails, including the following attributes:
(1). email: {string} | {Array}
The recipient's email address, or an array of strings if there are multiple recipients.
(2).cc: {string} | {Array}
The email address of the cc recipient, if there are multiple cc recipients, it will be represented by a string array.
(3).bcc:{string} | {Array}
The email address of the blind copy recipient, if there are multiple blind copy recipients, it will be represented by a string array.
(4).subject:{string}
The subject of the email.
(5).text:{string}
The body of the message.
(6).attachment:{string}
The path to the attachment.
// Email [email protected] and [email protected]({email: ["[email protected]", "[email protected]"],subject: "This is the subject of the email",text: "This is the message body"});边栏推荐
猜你喜欢
随机推荐
【ACM】dp专场训练
leetcode 85.最大矩形 单调栈应用
@Autowired注解 --required a single bean, but 2 were found出现的原因以及解决方法
设备管理中数据聚类处理
The most complete GIS related software in history (CAD, FME, ArcGIS, ArcGISPro)
C 语言 时间函数使用技巧(汇总)
Multifunctional Nanozyme Ag/PANI | Flexible Substrate Nano ZnO Enzyme | Rhodium Sheet Nanozyme | Ag-Rh Alloy Nanoparticle Nanozyme | Iridium Ruthenium Alloy/Iridium Oxide Biomimetic Nanozyme
mysql性能监控与执行计划
Tf铁蛋白颗粒包载顺铂/奥沙利铂/阿霉素/甲氨蝶呤MTX/紫杉醇PTX等药物
验证码倒计时自定义hooks
【图像分类】2017-MobileNetV1 CVPR
cordova 安装错误 Command failed: powershell 解决方法
组合导航精度分析
【图像分类】2019-MoblieNetV3 ICCV
指针常量和常量指针
多功能纳米酶Ag/PANI|柔性衬底纳米ZnO酶|铑片纳米酶|Ag-Rh合金纳米颗粒纳米酶|铱钌合金/氧化铱仿生纳米酶
三子棋的设计和代码
echart 特例-多分组X轴
水溶性合金量子点纳米酶|CuMoS纳米酶|多孔硅基Pt(Au)纳米酶|[email protected]纳米模拟酶|PtCo合金纳米粒子
[CNN] Brush SOTA's trick









