微信跳一跳辅助小蒙版

 前几天没事干看别人一直在玩微信上线的那一个跳一跳小游戏,玩着玩着老是掉下去,闲着没事呗

就想了想做一个辅助程序的呗.不过先做的手动版的.自动版的有点麻烦.就不发了.用的Java写的,也就一个蒙版.

下面就开始介绍我的小程序,没好多东西,真正的代码应该就是100行左右,没啥难的.

  下面这是我的微信朋友们的跳一跳

也就这样吧,因为wechat还是有那个仿作弊系统的,所以还是低调的吧...

话不多说,还是下面奉上我的code吧,说多了墨迹呢....

  1 package com.rain.jump.util;
  2 
  3 import java.awt.event.MouseAdapter;
  4 import java.awt.event.MouseEvent;
  5 import java.io.IOException;
  6 import javax.swing.JFrame;
  7 import javax.swing.JLabel;
  8 
  9 /**
 10  * @classname JumpOneJump.java
 11  * @package com.rain.jump.util
 12  * @project Jump
 13  * @author Rain 
 14  * @describe 微信跳一跳项目
 15  * @version 1.0
 16  * @date 2018年1月13日 下午12:06:07
 17  */
 18 public class JumpOneJump extends JFrame{
 19     /**
 20      * 
 21      */
 22     private static final long serialVersionUID = 1L;
 23     //定义两点坐标
 24     int x0,y0,x1,y1;
 25     //设置鼠标点击是第一次还是...
 26     boolean flag=true;
 27     public JumpOneJump()
 28     {
 29         super("微信跳一跳");//调父类的方法
 30         this.setSize(316,565);
 31         this.setUndecorated(true);
 32         //设置窗口居中
 33         this.setLocationRelativeTo(null);
 34         this.setOpacity(0.3f);
 35         this.setAlwaysOnTop(true);
 36         this.setVisible(true);
 37         this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 38         
 39 
 40         JLabel jLabel=new JLabel();
 41         this.add(jLabel);
 42         
 43         //给jLabel添加一个监听
 44         this.addMouseListener(new MouseAdapter() {
 45             //当你鼠标点击的时候
 46             public void mouseClicked(MouseEvent e){
 47                 //参数 鼠标的事件源
 48                 //System.out.println(e);
 49                 if(e.getButton()==MouseEvent.BUTTON3)
 50                 {
 51                     //System.out.println("哈哈哈");
 52                     
 53                     
 54                     if(flag)
 55                     {
 56                         x0=e.getX(); 
 57                         y0=e.getY();
 58                         flag=false;
 59                         System.out.println("第一次点击的坐标是:("+x0+","+y0+")");
 60                     }
 61                     else{
 62                         x1=e.getX();
 63                         y1=e.getY();
 64                         flag=true;
 65                         System.out.println("第二次点击的坐标是:("+x1+","+y1+")");
 66                         //取绝对值
 67                         double _x=Math.abs(x0-x1);
 68                         double _y=Math.abs(y0-y1);
 69                         //开平方(两点的距离)
 70                         double dis = Math.sqrt(_x*_x+_y*_y);
 71                         System.out.println(dis);
 72                         //定义adb命令
 73 //                        String cmd="adb shell input touchscreen "
 74 //                                +"swipe 200 187 200 187 "+Math.round(dis*3);
 75                         String cmd="adb shell input swipe 320 410 320 410 "+Math.round(dis*5);
 76                         Runtime run = Runtime.getRuntime();
 77                         
 78                         try {
 79                             //执行命令
 80                             Process p=run.exec(cmd);
 81                             System.out.println(cmd);
 82                             p.waitFor();
 83                         } catch (IOException e1) {
 84                             // TODO Auto-generated catch block
 85                             e1.printStackTrace();
 86                         } catch (InterruptedException e1) {
 87                             // TODO Auto-generated catch block
 88                             e1.printStackTrace();
 89                         }
 90                         
 91                     }//end else
 92                     
 93                 }//end if
 94             }//end mouseClick()
 95         });
 96         
 97     }
 98     
 99     //程序的入口
100     public static void main(String[] args) {
101         
102         
103         
104          new JumpOneJump();
105     }
106 
107 }

不过这个辅助用法还是有讲究的呢...要配套ADB工具, 

还要那个就是配套的那个能在电脑上面操作手机的辅助工具,类似TC的套件呀,

还有就是手机得开USB调试(这个在开发者模式中有的),然后看下连接上了电脑没,win+R键然后在输入cmd进入命令行模式,然后adb devices看有没有连接上手机.

还是不懂的下面评论,然后告知你的...谢谢大家 了

再附上下图片,刚刚跳的.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值