当前位置:网站首页>Auto. JS to realize automatic unlocking screen
Auto. JS to realize automatic unlocking screen
2022-06-24 21:23:00 【C colony】
Write it at the front :
This article records my own development process , Basic problems encountered , It is also convenient for future development .
If you're a beginner Auto.js Development , I suggest you read this article Auto.js introduction 【 Hyperbasic 】, This article is the work I read when I started , Overall, I felt very good , The basic content has been mentioned , It is completely suitable for novices to make some simple scripts for their own use .
One 、 Advanced method
1、 Define methods ( Personal advice only )
Follow the advice of the first article , It is also recommended to store all custom functions separately , Post call use .
2、 Code
// Unlock screen
function unlock()
{
if(!device.isScreenOn())
{
device.wakeUp();
sleep(500);
swipe(500,2000,500,1000,210);
sleep(500)
var password = "00000" // Enter the password of your mobile phone here
for(var i = 0; i < password.length; i++)
{
var p = text(password[i].toString()).findOne().bounds();
click(p.centerX(), p.centerY());
sleep(100);
}
}
}This method is only used for mobile phones unlocked by digital password , Because the mobile phone of the subject uses a digital password , So other unlocking methods have not been tried , Interested partners can try it by themselves . Enter the password in the code , Not particularly smart , I look forward to your exchange and improvement with me .
The code here is relatively simple , I won't go into that , If you don't understand, you can read the development documents , The content and usage are very detailed :Auto.js official API Document gate , You can learn by yourself , You can also send me a private letter to answer .
3、 ... and 、 Last
1、 What's wrong , Welcome to discuss .
2、 If you have any questions, please let me know , You can also pay attention to me , We will update other advanced methods later .
边栏推荐
- How Fiddler works
- Nifi fast authentication configuration
- The Google File System (GFS) learning notes
- NPM download speed is slow
- Tool composition in JMeter
- Variable setting in postman
- Is the waiting insurance record a waiting insurance evaluation? What is the relationship between the two?
- VIM usage
- Leetcode (146) - LRU cache
- The first day of handwritten RPC -- review of some basic knowledge
猜你喜欢

Haitai Advanced Technology | application of privacy computing technology in medical data protection

After screwing the screws in the factory for two years, I earned more than 10000 yuan a month by "testing" and counterattacked

ping: www.baidu.com: 未知的名称或服务

Postman assertion

Bridging mode -- law firm

B站带货当学新东方

Hongxiang Yunteng is compatible with dragon lizard operating system, and the product runs stably

OSI notes sorting

Does the developer want to change to software testing?

123. 买卖股票的最佳时机 III
随机推荐
Splicing audio files with ffmpeg-4.3
Learn to use a new technology quickly
CondaValueError: The target prefix is the base prefix. Aborting.
Introduction to interval DP
海泰前沿技术|隐私计算技术在医疗数据保护中的应用
How to apply agile development ideas to other work
Variable setting in postman
Summary of idea practical skills: how to rename a project or module to completely solve all the problems you encounter that do not work. It is suggested that the five-star collection be your daughter
Leetcode (135) - distribute candy
Three more days
NPM download speed is slow
虚拟货币7个月蒸发2万亿美元,“马斯克们”终结15万人暴富梦
go_ keyword
ping: www.baidu.com: 未知的名称或服务
Network security review office starts network security review on HowNet
Self signed certificate generation
Am, FM, PM modulation technology
I feel that I am bald again when I help my children with their homework. I feel pity for my parents all over the world
Interpreter mode -- formulas for dating
How Fiddler works