传奇广告查询第一站 同步gm1.com

autojs 手游 脚本UI demo【仅供学习交流】
原创 于2026-01-05 18:07:00发布
3 阅读
0
0

autojs 问道手游 脚本【仅供学习交流】
此处提供简易版悬浮窗demo
详情实现私聊博主

importClass(android.view.View); var entries = "主线|师门"; auto.waitFor(); auto.setMode('normal'); requestScreenCapture(); var window = floaty.window( <vertical> <vertical bg="#7f8c8d" padding="0"> <horizontal > <button id="center" textColor="green" textStyle="bold" margin="0" w="60">help</button> <spinner id="spinner" entries="{{entries}}" /> <button id="btn" w="0" text="开始" layout_weight="0.2"> </button> <button id="exit" w="0" text="退出" layout_weight="0.2"></button> </horizontal> </vertical> </vertical> ); window.setPosition(window.getX(), window.getY() + 200); var x = 0, y = 0, windowX = 0, windowY = 0, isRuning = false, showConsole = false, isShowingAll = true; window.center.setOnTouchListener(function (view, event) { switch (event.getAction()) { case event.ACTION_DOWN: x = event.getRawX(); y = event.getRawY(); windowX = window.getX(); windowY = window.getY(); break; case event.ACTION_MOVE: window.setPosition(windowX + (event.getRawX() - x), windowY + (event.getRawY() - y)); break; case event.ACTION_UP: if (Math.abs(event.getRawY() - y) < 5 && Math.abs(event.getRawX() - x) < 5) { ui.run(function () { if (isShowingAll) { isShowingAll = false; window.spinner.setVisibility(View.GONE); window.btn.setVisibility(View.GONE); window.exit.setVisibility(View.GONE); } else { isShowingAll = true; window.spinner.setVisibility(View.VISIBLE); window.btn.setVisibility(View.VISIBLE); window.exit.setVisibility(View.VISIBLE); } }); } break; } return true; }); window.exit.click(function(){ window.close(); engines.stopAll(); }) window.btn.click(function () { if (window.btn.getText() == '停止') { toast("停止任务"); window.btn.setText("开始"); } else { let r = window.spinner.getSelectedItem(); toast("开始"+r); if(r=='主线'){ threads.start(function(){ runzx(); }) }else if(r='师门'){ threads.start(function(){ runsm(); }) } window.btn.setText("停止"); } }); function runzx(){ while(true){ //具体逻辑 toast("主线运行中") sleep(1000); } } function runsm(){ while(true){ //具体逻辑 toast("师门运行中") sleep(1000); } } setInterval(() => { }, 1000); 
管理员
0
0
0
分享
上一篇: 传奇服务器怎么修改背包金刚石显示,教你在服务器加自己的装备
下一篇: 使用3个命令从Android APK中提取代码
评论
历史记录
回顶部
浏览时间 游戏名称 游戏IP 开区网址
注册1GM论坛账号
  • 上传头像
注册

已有账号,

微信扫码登录
重置密码
重置密码

注册

绑定关联手机号
关联手机号