Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. public void nativeKeyPressed(NativeKeyEvent event) {
  2. System.out.println("Key Pressed: " + NativeKeyEvent.getKeyText(event.getKeyCode()));
  3. if (event.getKeyCode() == NativeKeyEvent.VC_F) {
  4. keepPressingO = true;
  5.  
  6. new Thread() {
  7. @Override
  8. public void run() {
  9. try {
  10. while (keepPressingO) {
  11. Robot robot = new Robot();
  12. robot.keyPress(KeyEvent.VK_Q);
  13. robot.keyPress(KeyEvent.VK_Q);
  14. robot.delay(160);
  15. robot.keyPress(KeyEvent.VK_W);
  16. robot.keyPress(KeyEvent.VK_W);
  17. robot.delay(160);
  18. robot.keyPress(KeyEvent.VK_E);
  19. }
  20. } catch (AWTException e) {
  21. e.printStackTrace();
  22. }
  23. }
  24. }.start();
  25.  
  26. }
  27.  
  28. KEYB_Event (VK_KEY_Q, 0, 0, 0) 'Hold button 1
  29. KEYB_Event (VK_KEY_Q, 0, 0, 0)
  30. Thread.Sleep (60) 'here is the time that goes through another spell
  31.  
  32. KEYB_Event (VK_KEY_W, 0, KEYEVENTF_KEYUP, 0) 'Release button 1
  33.  
  34. KEYB_Event (VK_KEY_W, 0, 0, 0) 'Hold button 2
  35.  
  36. Thread.Sleep (26) 'here is the time that goes through another spell
  37.  
  38. KEYB_Event (VK_KEY_E, 0, KEYEVENTF_KEYUP, 0) 'Release button 2
  39.  
  40. KEYB_Event (VK_KEY_E, 0, 0, 0) 'Hold button 3
  41.  
  42. Thread.Sleep (60) 'here is the time that goes through another spell
  43.  
  44. KEYB_Event (VK_KEY_E, 0, KEYEVENTF_KEYUP, 0) 'Release button 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement