请问悬浮窗中的按钮text用什么命令修改?怎么试都不行。我想
autojs吧
全部回复
仅看楼主
level 3
请问悬浮窗中的按钮text用什么命令修改?怎么试都不行。我想按钮点击一次后就显示别的文字。
var w = floaty.window(
<frame>
<button id="action" text="学生姓名" w="120" h="40"/>
</frame>
);
2020年06月09日 07点06分 1
level 9
另外,因为脚本运行的线程不是UI线程,而所有对控件的修改操作需要在UI线程执行,此时需要用ui.run,例如:
ui.run(function(){ w.text.setText("文本");});
2020年06月09日 08点06分 2
这样写了也不行才问的[汗]
2020年06月09日 08点06分
错误:TypeError:Cannot call method"setText" of undefined
2020年06月09日 08点06分
level 9
不看文档的吗?
2020年06月09日 08点06分 3
level 9
w.action.setText("123")
2020年06月09日 08点06分 4
根据你按钮id获取对象
2020年06月09日 08点06分
@海的思念bd 这种一般仔细点看文档都能解决的
2020年06月09日 09点06分
谢谢[哈哈]
2020年06月09日 08点06分
1