WaitDisappear 等待节点消失
命令名称: jsd.WaitDisappear 等待节点消失
语法格式: jsd.WaitDisappear(by,时长)
命令参数: 参数1:字符串型,节点信息。
参数2:整数型,等待时长,单位毫秒
返回值: 布尔值:节点消失返回true,否则返回false。
```脚本例子: 复制代码
Import "jsd.luae"
Import "shanhai.lua"
ShanHai.execute "chmod -R 777 " & GetTempDir()
If Dir.Exist(GetTempDir() & "jsd.apk") = 0 Then
TracePrint "释放附件"
PutAttachment GetTempDir(),"jsd.apk"
End If
//只需执行一次
If jsd.StartServer() Then
TracePrint "恭喜你!!可以使用插件"
Else
TracePrint "很遗憾!!!你无法使用插件"
End If
If jsd.WaitDisappear("By.text('按键精灵')",5000) Then
TracePrint "节点消失了"
Else
TracePrint "节点存在"
End If
```
备注: 无。