Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void nativeKeyPressed(NativeKeyEvent event) {
- System.out.println("Key Pressed: " + NativeKeyEvent.getKeyText(event.getKeyCode()));
- if (event.getKeyCode() == NativeKeyEvent.VC_F) {
- keepPressingO = true;
- new Thread() {
- @Override
- public void run() {
- try {
- while (keepPressingO) {
- Robot robot = new Robot();
- robot.keyPress(KeyEvent.VK_Q);
- robot.keyPress(KeyEvent.VK_Q);
- robot.delay(160);
- robot.keyPress(KeyEvent.VK_W);
- robot.keyPress(KeyEvent.VK_W);
- robot.delay(160);
- robot.keyPress(KeyEvent.VK_E);
- }
- } catch (AWTException e) {
- e.printStackTrace();
- }
- }
- }.start();
- }
- KEYB_Event (VK_KEY_Q, 0, 0, 0) 'Hold button 1
- KEYB_Event (VK_KEY_Q, 0, 0, 0)
- Thread.Sleep (60) 'here is the time that goes through another spell
- KEYB_Event (VK_KEY_W, 0, KEYEVENTF_KEYUP, 0) 'Release button 1
- KEYB_Event (VK_KEY_W, 0, 0, 0) 'Hold button 2
- Thread.Sleep (26) 'here is the time that goes through another spell
- KEYB_Event (VK_KEY_E, 0, KEYEVENTF_KEYUP, 0) 'Release button 2
- KEYB_Event (VK_KEY_E, 0, 0, 0) 'Hold button 3
- Thread.Sleep (60) 'here is the time that goes through another spell
- KEYB_Event (VK_KEY_E, 0, KEYEVENTF_KEYUP, 0) 'Release button 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement