/*
软件作者:https://xuhss.com/oxox/pro
*/
var window = floaty.window(
<frame>
<vertical>
<linear>
<button id="action" text="移动" gravity="center" w="40" h="40" color="#ffffff" bg="#77000000"/>
<button id="nzh" text="画圆" w="40" h="40" color="#ffffff" bg="#77000000" margin="1 0 0 0"/>
</linear>
<img id="tp" w="81" h="0" bg="#44000000" />
</vertical>
</frame>
);
//记录按键被按下时的触摸坐标
var x = 0,
y = 0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
window.action.setOnTouchListener(function(view, event) {
switch (event.getAction()) {
case event.ACTION_DOWN:
x = event.getRawX();
y = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
return true;
case event.ACTION_MOVE:
//移动手指时调整悬浮窗位置
window.setPosition(windowX + (event.getRawX() - x),
windowY + (event.getRawY() - y));
// if(xs==1){
// window2.setPosition(windowX + (event.getRawX() - x),
// windowY + (event.getRawY() - y)+82);
// }
return true;
case event.ACTION_UP:
//手指弹起时如果偏移很小则判断为点击
return true;
}
return true;
});
//requestScreenCapture();
function jt() {
while (true) {
if (tu = captureScreen()) {
return tu;
break;
}
}
}
hkz=0;
window.nzh.on("touch_down", () => {
//window.tp.setImageBitmap(jt().bitmap);
if(hkz==0){
hkz=1;
threads.start(function(){
sleep(1000);
hy(360,550,300,0);});
}else{threads.shutDownAll();hkz=0;}
//sleep(1500);
//hy(360,550,100,20);
});
function hy(prx, pry, prt,prtn) {
var kz=1;
var htx=prt*Math.cos(0*(Math.PI/180));
var hty=prt*Math.sin(0*(Math.PI/180));
threads.start(function(){
for(var ix=0;ix<1360;ix++){
if(ix%360==0){prt-=2;ix=0;}
sleep(1);
htx=prt*Math.cos(ix*(Math.PI/180));
hty=prt*Math.sin(ix*(Math.PI/180));
}
sleep(1000);
kz=0;
});
threads.start(function() {
touchdown(prx+htx,pry+hty,prtn);
while(kz==1){
sleep(5);
touchmove(prx+htx,pry+hty,prtn);
}
touchup(prx+htx,pry+hty,prtn);
});
}
function touchdown(pressx, pressy, pressn) {
new android.app.Instrumentation().sendPointerSync(android.view.MotionEvent.obtain(android.os.SystemClock.uptimeMillis(), android.os.SystemClock.uptimeMillis(),0, pressx, pressy, pressn));
}
function touchmove(pressx, pressy, pressn) {
new android.app.Instrumentation().sendPointerSync(android.view.MotionEvent.obtain(android.os.SystemClock.uptimeMillis(), android.os.SystemClock.uptimeMillis(), 2, pressx, pressy, pressn));
}
function touchup(pressx, pressy, pressn) {
new android.app.Instrumentation().sendPointerSync(android.view.MotionEvent.obtain(android.os.SystemClock.uptimeMillis(), android.os.SystemClock.uptimeMillis(), 1, pressx, pressy, pressn));
}
while (true) {
sleep(1000);
}
没有合适的资源?快使用搜索试试~ 我知道了~
AutoJs源码-免root免无障碍画球
共1个文件
js:1个
需积分: 1 0 下载量 190 浏览量
2022-11-15
09:19:26
上传
评论
收藏 1KB 7Z 举报
温馨提示
AutoJs源码-免root免无障碍画球。本资源购买前提醒:本源码都是实际autojs项目模板,安装好autojs直接运行即可打开。1、支持低版本autojs。2、资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!。3、安装过程详见具体资源,不会使用autojs谨慎下载
资源推荐
资源详情
资源评论
收起资源包目录
AutoJs源码-免root免无障碍画球.7z (1个子文件)
AutoJs源码-免root免无障碍画球.js 4KB
共 1 条
- 1
资源评论
[虚幻私塾】
- 粉丝: 335
- 资源: 1559
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功