Results 1 to 7 of 7

Thread: Pressing action bar with keyboard.

  1. #1
    Join Date
    Aug 2016
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default Pressing action bar with keyboard.

    Is there a way to press an action bar button using the keyboard shortcut, similar to how bankScreen.clickButton has a useKey parameter? I notice there is actionBar.clickSlot, but no equivalent keyboard procedure?

    More generally speaking, what are the recommended methods for sending keyboard input? Why does it look like there are many different procedures to do the same thing? Also, where can I get the key code constants?

    Thanks in advance.

    EDIT: RS3 and SRL6, in case there was any ambiguity.

  2. #2
    Join Date
    Sep 2014
    Location
    C:\Simba\
    Posts
    565
    Mentioned
    9 Post(s)
    Quoted
    71 Post(s)

    Default

    SendKeys / Typesend / (Typebyte ?) / Don't know all methods of srl6 but there should be a few, make sure you read the source code for it so it doesn't have static wait times / no wait time at all while holding a key down.
    Feel free to ask me any questions, I will do my best to answer them!

    Previously known as YouPee.

  3. #3
    Join Date
    Oct 2012
    Posts
    1,258
    Mentioned
    40 Post(s)
    Quoted
    588 Post(s)

    Default

    typesend

  4. #4
    Join Date
    Dec 2013
    Location
    Pitcairn Island
    Posts
    288
    Mentioned
    20 Post(s)
    Quoted
    166 Post(s)

    Default

    Quote Originally Posted by Thunderlord9741 View Post
    Is there a way to press an action bar button using the keyboard shortcut, similar to how bankScreen.clickButton has a useKey parameter? I notice there is actionBar.clickSlot, but no equivalent keyboard procedure?

    More generally speaking, what are the recommended methods for sending keyboard input? Why does it look like there are many different procedures to do the same thing? Also, where can I get the key code constants?

    Thanks in advance.

    EDIT: RS3 and SRL6, in case there was any ambiguity.
    This is covered in the Action Bar section:
    https://villavu.com/forum/showthread.php?t=109161


    Although, I do think it would be nice to add keyboard compatibility to clickSlot

    actionBar.clickSlot(Slot: Integer; pressKey: Boolean);
    @Thomas;

  5. #5
    Join Date
    May 2012
    Posts
    499
    Mentioned
    23 Post(s)
    Quoted
    228 Post(s)

    Default

    Quote Originally Posted by Laquisha View Post
    This is covered in the Action Bar section:
    https://villavu.com/forum/showthread.php?t=109161


    Although, I do think it would be nice to add keyboard compatibility to clickSlot

    actionBar.clickSlot(Slot: Integer; pressKey: Boolean);
    @Thomas;
    Wont be added, keys can be changed for each slot/icon on actionbar.

    Just use
    Code:
    typeByte(VK_k);
    TypeByte is probably fastest and most failproof.
    A full list of all key bytes can be found in the documentation.

  6. #6
    Join Date
    Aug 2016
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Thank you all for the responses. I'm not quite sure why this wasn't working for me before, but I'll go try it again and see what happens.

  7. #7
    Join Date
    May 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    i was using Presskey but it was a wrong idea because it holds the key so it "spams" a little bit. Otherwise I am using
    Simba Code:
    keydown(VK_1);
    wait(gaussRangeInt(50,120));
    keyup(VK_1);

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •