September 6, 20196 yr I want to make my own dialog solver because the default one takes too long. IE i'd like to press the option >before< it appears like a human would do to save ticks. Here is the code: (insert code button infintely lagging for me rn..) Quote boolean rel; @Override public int onLoop() { if (rel) { log("Release"); keyboard.releaseKey(KeyEvent.VK_1); rel = false; } else { log("Press"); keyboard.pressKey(KeyEvent.VK_1); rel = true; return 600; } No combination of keys (numbers, space) or delays seems to work. It does print press and release, but the dialog is unchanged. Pressing 1 on the keyboard instantly passes the dialog. I have also tried this: Quote bot.getKeyEventHandler().generateBotKeyEvent(KeyEvent.PRESS, System.currentTimeMillis(), 0, KeyEvent.VK_1, '1'); That does not work either. However, this does work: Quote keyboard.typeKey('1', 0, 0, false); But it is much too slow for what I'm trying to do. It does not seem to accept my time argument, and takes 100ms or so regardless of it. Any help or workarounds? EDIT: yeah it seems to refuse to type in the chatbox either. Am I just doing it wrong or is it actually broke? EDIT2: This does indeed work: keyboard.pressKey(KeyEvent.VK_F1); F keys work, just not regular keys THANK YOU! Edited September 6, 20196 yr by top kek
September 6, 20196 yr 19 minutes ago, top kek said: I just do getKeyboard().typeString() for non fkeys
September 6, 20196 yr Author 5 hours ago, FuryShark said: I just do getKeyboard().typeString() for non fkeys thats too slow i need it to type in 40ms
Create an account or sign in to comment