Java Wechat Jump Operation Guide, 원하는 곳을 가리키고 있습니다.
이 기사의 아이디어는 ADB를 통한 휴대폰 작동을 제어하고 JFRAME를 작성하여 Java를 통해 휴대 전화 화면을 덮고 마우스를 사용하여 점프의 출발점과 종말점을 얻은 다음 점프 거리와 프레스 시간 (선형 관계) 사이의 관계 (선형 관계)를 얻기 위해 (선형 관계)를 얻은 다음 계산 된 결과에 따라 프레스 시간을 사용하여 계산 시간을 사용하여 계산 시간에 필요한 시간을 보내십시오. 컴퓨터의 화면에 jframe을 덮어 씁니다).
코드는 다음과 같이 매우 짧습니다.
패키지 점프; import java.awt.flowlayout; import java.awt.event.mouseadapter; import java.awt.event.mouseevent; import javax.swing.jframe; import javax.swing.jlabel; @suppresswarnings ( "serial") public class jframe jlabel jlabel label; 부울 플래그 = 거짓; int x0, y0, x1, y1; public JumpJump () {super ( "wechat jump"); // 새 창을 만듭니다. this.setopacity (0.7f); this.setsize (320,580); // set this.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) {! flag) {x0 = e.getx (); y0 = e.gety (); 문자열 + a a x a a click a the click of the click of the click a the coord of the click입니다. " + y0; label.settext (dis)*4.8+"; (예외 e1) {e1.printstacktrace (); } public static void main (String [] args) {new JumpJump (); }}다음 코드는 투명성을 설정합니다.
this.setUndEcorated (true); this.setopacity (0.7f);
X0 Y0은 마우스가 처음으로 클릭하는 지점의 좌표이며 X1 Y1은 두 번째 좌표입니다. 플래그에 따라 첫 번째 또는 두 번째 클릭 여부에 따라 결정됩니다.
이 단락은 CMD 작업을 제어하는 코드이므로 매번 CMD로 입력 할 필요가 없습니다.
문자열 cmd = "ADB 쉘 입력 터치 스크린 스 와이프 170 187 170 187"+math.round (dis*4.6); 런타임 런 = runtime.getRuntime (); try {process pr = run.exec (cmd); System.out.println (CMD); pr.waitfor (); } catch (예외 e1) {e1.printstacktrace (); System.out.println (E1); }여기의 계수는 연속 테스트를 통해 자체적으로 조정해야합니다. 즉, 마지막 계수 4.6은 자체적으로 조정할 수 있습니다.
문자열 cmd = "ADB 쉘 입력 터치 스크린 스 와이프 170 187 170 187"+math.round (dis*4.6);
작동 방법은 매우 간단합니다. 체스 조각의 현재 위치를 한 번 마우스 오른쪽 버튼으로 클릭 한 다음 착륙 위치를 다시 마우스 오른쪽 버튼으로 클릭하십시오.
더 많은 내용을 보려면 학습 할 특별한 주제 "Jump On Wechat"을 참조하십시오.
위는이 기사의 모든 내용입니다. 모든 사람의 학습에 도움이되기를 바랍니다. 모든 사람이 wulin.com을 더 지원하기를 바랍니다.