Czar Posted May 8, 2014 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!
Swizzbeat Posted May 8, 2014 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.