/*
软件作者:https://xuhss.com/oxox/pro
*/
//by Mannix QQ 3068758340
//date 6-14-2019
//下面这行的文件路径自己写
var json = JSON.parse(files.read("/sdcard/tencent/QQfile_recv//中文笔画数据.json"));
toast("读取完成");
var window = floaty.rawWindow(
<frame gravity="center">
<button id="button" h="*" w="*" />
</frame>
);
window.exitOnClose();
window.button.click(() => {
threads.start(function() {
onClick()
})
});
window.button.setBackgroundColor(colors.argb(0, 255, 255, 255))
setInterval(() => {
ui.run(function() {
var send = depth(10).text("发送").packageName("com.tencent.mobileqq").find()
if (!send.empty()) {
var rect = send[0].bounds()
window.setPosition(rect.left, rect.top);
window.setSize(rect.width(), rect.height());
} else {
window.setPosition(0, 0);
window.setSize(0, 0)
}
});
}, 100);
function onClick() {
var send = depth(10).text("发送").packageName("com.tencent.mobileqq").find()[0]
accessibilityFocused(false).className("android.widget.ImageView").clickable(true).column(-1).columnCount(0).columnSpan(-1).contextClickable(false).depth(9).dismissable(false).drawingOrder(6).editable(false).enabled(true).focusable(true).indexInParent(5).findOne().click();
var doodling = desc("涂鸦按钮").find()
while (doodling.empty()) {
var rect = clickable(false).depth(8).scrollable(true).findOne().bounds();
swipe((rect.right + rect.centerX()) / 2, rect.centerY(), (rect.left + rect.centerX()) / 2, rect.centerY(), 10);
doodling = desc("涂鸦按钮").find()
//toast("unfind")
}
doodling.click();
var input = className("android.widget.EditText").depth(9).findOne()
input.setText("");
paint(input.text());
}
function paint(str) {
log(str)
threads.shutDownAll();
var thread = threads.start(function() {
toast("start")
str = str.split("");
var sizeY = Math.ceil(Math.sqrt(str.length));
var sizeX = 0;
while (sizeX * sizeY < str.length) {
sizeX++;
}
print(sizeX + ";" + sizeY)
for (var ty = 0; ty < sizeY; ty++) {
for (var tx = 0; tx < sizeX; tx++) {
var word = str.shift();
if (json[word]) {
print(word)
board = className("android.view.View").depth(9).accessibilityFocused(false).indexInParent(0).longClickable(false).editable(false).enabled(true).focusable(false).drawingOrder(2).findOne();
rect = board.bounds();
rect_w = rect.width() * 0.8;
rect_h = rect.height();
rect_l = rect.left + rect_w * 0.1;
rect_t = rect.top;
var date = json[word];
print(date)
for (var m = 0; m < date.length; m++) {
for (var n = 0; n < date[m].length - 2; n += 2) {
try {
className("android.view.View").depth(9).accessibilityFocused(false).indexInParent(0).longClickable(false).editable(false).focusable(false).drawingOrder(2).findOne();
swipe(rect_l + (rect_w / sizeX) * (tx + date[m][n] / 1000), rect_t + (rect_h / sizeY) * (ty + date[m][n + 1] / 1000), rect_l + (rect_w / sizeX) * (tx + date[m][n + 2] / 1000), rect_t + (rect_h / sizeY) * (ty + date[m][n + 3] / 1000), 10)
} catch (e) {
print(e + ";" + m + ";" + n + ";")
}
}
}
}
}
}
text("发送").longClickable(false).indexInParent(1).editable(false).drawingOrder(2).dismissable(false).depth(10).contextClickable(false).clickable(true).className("android.widget.Button").findOne().click()
toast("finish")
})
}
没有合适的资源?快使用搜索试试~ 我知道了~
AutoJs源码-QQ涂鸦-汉字-lite
共1个文件
js:1个
需积分: 1 0 下载量 185 浏览量
2022-11-15
03:04:45
上传
评论
收藏 2KB 7Z 举报
温馨提示
AutoJs源码-QQ涂鸦_汉字_lite。本资源购买前提醒:本源码都是实际autojs项目模板,安装好autojs直接运行即可打开。1、支持低版本autojs。2、资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!。3、安装过程详见具体资源,不会使用autojs谨慎下载
资源推荐
资源详情
资源评论
收起资源包目录
AutoJs源码-QQ涂鸦_汉字_lite.7z (1个子文件)
AutoJs源码-QQ涂鸦_汉字_lite.js 4KB
共 1 条
- 1
资源评论
[虚幻私塾】
- 粉丝: 335
- 资源: 1559
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功