回答
你可以使用以下Hamibot脚本来实现中国移动App自动领取心愿币的功能:
// 文档地址 https://docs.hamibot.com/
// 启动中国移动App
launchApp("中国移动");
// 等待App加载完成
sleep(5000);
// 点击进入活动页面(根据实际界面调整选择器)
var enterButton = text("心愿币").findOne(5000);
if (enterButton) {
click(enterButton.bounds().centerX(), enterButton.bounds().centerY());
sleep(3000);
}
// 查找并点击领取按钮
var claimButtons = textMatches(".*领.*").find();
for (var i = 0; i < claimButtons.length; i++) {
var button = claimButtons[i];
if (button.clickable()) {
click(button.bounds().centerX(), button.bounds().centerY());
sleep(2000);
}
}
// 返回主页并退出
back();
sleep(1000);
home();
注意事项:
- 需要先使用Hamibot的控件检查器获取准确的控件选择器
- 不同地区的中国移动App界面可能有所不同,需要根据实际情况调整选择器
- 建议在真机上测试并调整等待时间
- 确保已授予Hamibot必要的无障碍权限
你可以根据实际App界面修改文本选择器和操作逻辑。
ℹ️ 本回答由 AI 生成,内容仅供参考