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

Discussion in 'Developer Support' started by wrengar, Dec 3, 2018.

  1. wrengar

    Joined:
    Jul 19, 2015
    Messages:
    2
    Likes Received:
    0
    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?
     
  2. Swatarinaess

    Swatarinaess Bot Consultant

    Joined:
    Nov 17, 2014
    Messages:
    179
    Likes Received:
    43
    The easiest way is to make a condition where the bot presses the "1" key until the chat dialog disappears.
     
  3. CuppaJava

    CuppaJava cuppaJava.drink(coffee);

    Joined:
    Mar 13, 2018
    Messages:
    607
    Likes Received:
    194
    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.
     
    #3 CuppaJava, Dec 4, 2018
    Last edited: Dec 4, 2018
  4. Swatarinaess

    Swatarinaess Bot Consultant

    Joined:
    Nov 17, 2014
    Messages:
    179
    Likes Received:
    43
    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.
     
  5. American Express

    American Express RuneMate Staff

    Joined:
    Oct 2, 2015
    Messages:
    2,335
    Likes Received:
    850
    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.
     

Share This Page

Loading...