FindChlid 节点中查找节点
命令名称: `jsd.FindChlid 节点中查找节点 `
语法格式:` jsd.FindChlid(结果变量,By信息[,保存变量]) `
命令参数: `参数1:字符串型,查找结果变量`
参数2:`字符串型,By链式`
参数3:`可选,字符串型,保存变量 `
返回值: `成功返回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
TracePrint jsd.StartServer()
//查找节点并保存
If jsd.FindNode("By.res('com.cyanogenmod.filemanager:id/navigation_view_layout')","node") Then
//节点中查找节点
TracePrint jsd.FindChlid("node","By.clazz('android.widget.ImageButton')","child")
End If
```
备注: 。