5

Auto.js 特殊定位控件方法 不能在ui线程执行阻塞操作,请使用setTimeout代替

 2 years ago
source link: https://blog.51cto.com/u_14262285/5538376
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

<table><tr><td bgcolor=orange>本文所有教程及源码、软件仅为技术研究。不涉及计算机信息系统功能的删除、修改、增加、干扰,更不会影响计算机信息系统的正常运行。不得将代码用于非法用途,如侵立删!</td></tr></table>

Auto.js 特殊定位控件方法

  • win10
  • nexus5x
  • Auto.js 7.4
  • VS code

在页面中不能通过id、desc、text定位时通过以下方法定位并提取需要的数据

className(“控件类名”).depth(控件的depth).indexInParent(控件的indexInParent).find()

Auto.js 特殊定位控件方法  不能在ui线程执行阻塞操作,请使用setTimeout代替_子线程

然后通过forEach循环 text()提取数据

不能在ui线程执行阻塞操作,请使用setTimeout代替

//定义一个子线程,然后在子线程操作
var thread = threads.start(function () {
sleep(1500)
};
log("等待子线程处理完成")
thread.join();

<table><tr><td bgcolor=orange>本文仅供学习交流使用,如侵立删!</td></tr></table>



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK