当前位置:网站首页>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 .
边栏推荐
猜你喜欢

Pytest testing framework

Static routing job

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

虚拟货币7个月蒸发2万亿美元,“马斯克们”终结15万人暴富梦
Talking about the range of data that MySQL update will lock

Background of master data construction

Sleep revolution - find the right length of rest

Basic database syntax learning

Visitor model -- generation gap between young and middle-aged people

Appium desktop introduction
随机推荐
Pyaudio audio recording
Enjoy yuan mode -- a large number of flying dragons
Foundations of Cryptography
188. 买卖股票的最佳时机 IV
Handwritten RPC the next day -- review of some knowledge
How Fiddler works
Limit summary (under update)
Capture the whole process of accessing web pages through Wireshark
Rename and delete files
Am, FM, PM modulation technology
海泰前沿技术|隐私计算技术在医疗数据保护中的应用
Undo log and redo log must be clear this time
Go coding specification
More than ten years' work experience is recommended at the bottom of the box: how much does it cost to find a job? See here! Brothers and sisters are recommended to collect and pay attention
JMeter parameterization
Three more days
[cloud native learning notes] kubernetes Foundation
Markdown use
Requests requests for web page garbled code resolution
[cloud native learning notes] kubernetes practice command