1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    280
    Likes Received:
    76
    The easiest way is to make a condition where the bot presses the "1" key until the chat dialog disappears.
     
  3. CuppaJava

    CuppaJava cuppa.drink(java);

    Joined:
    Mar 13, 2018
    Messages:
    6,052
    Likes Received:
    1,360
    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:
    280
    Likes Received:
    76
    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:
    3,092
    Likes Received:
    1,112
    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...