SetText 设置节点输入框文字
命令名称: jsd.SetText 设置节点输入框文字
语法格式: jsd.SetText(By信息,设置内容[,指定下标])
命令参数: 参数1:字符串型,必选,By信息
参数2:字符串型,必选,需要设置的内容
参数3:数值型,指定下标,忽略则默认为0
返回值: 布尔值,成功返回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.SetText("By.res('com.android.flysilkworm:id/search_edit')","欢迎使用jsd")
```
备注: 仅支持5.0.x以上系统版本。