GetParentEx 获取多层父节点

命令名称: `jsd.GetParentEx 获取多层父节点 ` 语法格式:` jsd.GetParentEx(By信息,保存变量[,指定下标][获取层数]) ` 命令参数: `参数1:字符串型,必选,By信息` 参数2:`字符串型,必选,执行后的保存变量` 参数3:`数值型,指定下标,忽略则默认为0` 参数4:`数值型,获取父节点层数,默认获取1层` 返回值: `布尔值,成功返回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.GetParentEx("By.text('按键精灵')", "node", 0, 4) Then //获取按键精灵4层父节点 TracePrint Join(jsd.FindNodeInfo("node","rect"),",") End If ``` 备注: 无。