/*
寻找节点
@way:查找方式: text/desc/id/className
@str:節點文本
@timeOut:查找超时的时间,默认1000毫秒。可空
@视频对照教学:www.loveps.vip/121.html
*/
requestScreenCapture(); //请求截图权限
log(APP_取用户性别())
function APP_取用户性别() {
// 0,女;1,男;2,无
let objectAge = textEndsWith("岁").depth(18).findOne(1000)
let objectMan = textEndsWith("男").depth(18).findOne(1000)
let objectWomen = textEndsWith("女").depth(18).findOne(1000)
if (objectAge != null || objectMan != null || objectWomen != null) {
var rect;
if (objectAge != null) {
rect = objectAge.bounds() //获取性别范围
} else if (objectMan != null) {
rect = objectMan.bounds() //获取男 范围
} else if (object