Czar Posted May 8, 2014 Share Posted May 8, 2014 Hello, I've noticed that auto-typing is veryyy slow, which is a problem because it is affecting the productivity of my script. This was never a problem until recently. I have tried the following code: // client.typeString(message); for (int i = 0; i < message.length(); i++) { client.typeKey(message.charAt(i), 0, 0, false); } client.typeKey(' ', 0, 0, true); As you can see I have tried the typical 'typeString' method but it's slow, so I thought the manual key would be faster, which isn't. I don't see any other alternatives. Anybody care to help? Thanks! Link to comment Share on other sites More sharing options...
Swizzbeat Posted May 8, 2014 Share Posted May 8, 2014 public void typeString(String s, boolean enter) throws InterruptedException { for (char c : s.toCharArray()) { bot.getKeyboard().typeKeyEvent(c, 0); } if (enter) { client.typeKey((char)KeyEvent.VK_ENTER, 0, 0, false); } } Send key events yourself manually. Credits to @Zach. Link to comment Share on other sites More sharing options...
Czar Posted May 8, 2014 Author Share Posted May 8, 2014 Ahhh that's how. Thanks so much man! Link to comment Share on other sites More sharing options...