Java WeChat Jump Guide, указывая на то, где вы выберете.
The idea in this article is to control the operation of the mobile phone through adb, write a jframe to cover the mobile phone screen through java, use the mouse to obtain the starting point and end point of the jump, and obtain the relationship (linear relationship) between the distance of the jump and the pressing time (linear relationship), and then use adb to operate the pressing time according to the calculated results (a third-party tool is also needed here to transmit the screen to the computer in real time and перезаписать JFrame на экране на компьютере).
Код очень короткий, следующим образом:
ПАКЕТ ПРИМЕЧА; импорт java.awt.flowlayout; import java.awt.event.mouseadapter; import java.awt.event.mouseevent; import javax.swing.jframe; импорт javax.swing.jlabel; @suppresswarnings ("serial") Public jump jump. логический флаг = false; int x0, y0, x1, y1; public JumpJump () {super ("weChat Jump"); // Создать новое окно this.setundecorated (true); this.SetoPacity (0,7F); this.setsize (320,580); // установить это. setvisible (true); // visible // this.dispose (); this.SetLocationRelativeTo (null); this.tofront (); this.setLayout (new Flowlayout (flowlayout.center)); this.setDefaultCloseoPeration (jframe.exit_on_close); Jlabel label = new jlabel ("Щелкните правой кнопкой мыши"); this.add (метка); this.addMouseListener(new MouseAdapter(){ public void mouseClicked(MouseEvent e){ if(e.getButton() == MouseEvent.BUTTON3){ //3 represents right-click if(!flag) { x0 = e.getX(); y0 = e.getY(); String banner = "The coordinates of the current click position of the mouse are " + x0 + " + y0; Label.settext (math.ceil (dis)*4.8+""); (Exception e1) {e1.printstacktrace (); } public static void main (string [] args) {new JumpJump (); }}Следующий код устанавливает прозрачность:
this.setundecorated (true); this.SetoPacity (0,7F);
x0 y0 - это координата точки, которую мышь нажимает в первый раз, а X1 Y1 - вторая координата. Это определяется флагом, является ли это первым или вторым щелчком.
Этот абзац является кодом для управления операциями CMD, поэтому вам не нужно вводить его в CMD каждый раз:
String cmd = "Shell Shell Shell Spence Escreen Swipe 170 187 170 187"+Math.Round (DIS*4.6); Время выполнения run = runtime.getruntime (); try {process pr = run.exec (cmd); System.out.println (cmd); pr.waitfor (); } catch (Exception e1) {e1.printstackTrace (); System.out.println (E1); }Коэффициенты здесь должны быть скорректированы сами по себе посредством непрерывного тестирования, то есть последний коэффициент 4.6 может быть скорректирован сам по себе:
String cmd = "Shell Shell Shell Spence Escreen Swipe 170 187 170 187"+Math.Round (DIS*4.6);
Метод работы очень прост. Щелкните правой кнопкой мыши текущую позицию шахматного куска один раз, а затем снова щелкните правой кнопкой мыши по посадке.
Для получения дополнительного контента вы можете обратиться к специальной теме «прыжок на WeChat», чтобы узнать.
Выше всего содержание этой статьи. Я надеюсь, что это будет полезно для каждого обучения, и я надеюсь, что все будут поддерживать Wulin.com больше.