Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Is there a way to hold down a keyboard key?

Joined
Jul 19, 2015
Messages
3
I use
Keyboard.pressKey(KeyEvent.VK_1);
but it only presses the key once. I would like for it to continuously press the key if possible. Is it possible to emulate a key pressed down to skip certain dialogue?
 
Bot Consultant
Joined
Nov 17, 2014
Messages
304
The easiest way is to make a condition where the bot presses the "1" key until the chat dialog disappears.
 
cuppa.drink(java);
Joined
Mar 13, 2018
Messages
7,097
The easiest way is to make a condition where the bot presses the "1" key until the chat dialog disappears.
Wouldn't that show up as spam clicking the key jagex side? I don't actually know.

OP why don't you just use the Menu Buttons class or Continue or whatever? Let playersense take over

Edit: to clarify it's not actually called menu buttons, I haven't written a bot in months. It's like dialog option or something.
 
Last edited:
Bot Consultant
Joined
Nov 17, 2014
Messages
304
Wouldn't that show up as spam clicking the key jagex side? I don't actually know.

OP why don't you just use the Menu Buttons class or Continue or whatever? Let playersense take over

If there is a sufficient loop delay i believe it should be fine. When i play legit, i normally just bash keys to get through chat dialogs.
 
RuneMate Staff
Joined
Oct 2, 2015
Messages
3,224
If there is a sufficient loop delay i believe it should be fine. When i play legit, i normally just bash keys to get through chat dialogs.

I hold down space bar during chat dialogues to get through them quicker. I'm sure holding a key down generates more "interactions" with the server than pressing it individually.
 
Top