Results 1 to 9 of 9

Thread: Help with a script, PressKey - KeyDown not working

  1. #1
    Join Date
    Nov 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default Help with a script, PressKey - KeyDown not working

    Code:
        W.GetWidget(446, 34);
        W.Interact('Make-X');
        wait(1000);
        SendKeys('30', 100, 30);
        wait(1000);
        KeyDown(13);
        wait(RandomRange(100, 200));
        KeyUp(13);
    the code right clicks the widget, types the number 30 into the chatbox area, however when it comes to pressing the enter/return key, both BeyDown and PressKey aren't working, am i doing something wrong here? if you need more than just that snippet of code I can post more. I have gotten through most of the day resolving other problems but this one I just can't seem to figure out, Help would be greatly appreciated, thanks

    Edit : it's for Lape in OSRS

  2. #2
    Join Date
    Jun 2013
    Location
    Scranton
    Posts
    496
    Mentioned
    5 Post(s)
    Quoted
    220 Post(s)

  3. #3
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by jstemper View Post
    Try typesend('30');
    typeSend is an SRL-6 function. OP probably doesn't want that include for OSRS. I don't know what the aerolib/reflection equivalent would be. pressKey has worked for me in the past.
    Last edited by Citrus; 11-14-2016 at 01:37 AM.

  4. #4
    Join Date
    Nov 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    typeSend is an SRL-6 function. OP probably doesn't want that include for OSRS. I don't know what the aerolib/reflection equivalent would be. pressKey has worked for me in the past.
    Yeah i'd rather not use SRL-6, also yeah I have no idea why it doesn't work, doesn't provide me with any errors pressKey & keyDown don't work so i'm not too sure what my other options would be besides fiddling with some other stuff, i'm just beginning to do this stuff so I will have to try harder if i want to succeed i suppose.

  5. #5
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by JoeKlynnbe9 View Post
    Yeah i'd rather not use SRL-6, also yeah I have no idea why it doesn't work, doesn't provide me with any errors pressKey & keyDown don't work so i'm not too sure what my other options would be besides fiddling with some other stuff, i'm just beginning to do this stuff so I will have to try harder if i want to succeed i suppose.
    If you're using reflection, try the keyboard functions.

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

    Default

    try 10 instead of 13, does that do it for ya?

  7. #7
    Join Date
    Jun 2013
    Location
    Scranton
    Posts
    496
    Mentioned
    5 Post(s)
    Quoted
    220 Post(s)

    Default

    Reflect.Keyboard.TypeSend('30');

    ...

  8. #8
    Join Date
    Nov 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by acow View Post
    try 10 instead of 13, does that do it for ya?

    Quote Originally Posted by jstemper View Post
    Reflect.Keyboard.TypeSend('30');

    ...
    Quote Originally Posted by Citrus View Post
    If you're using reflection, try the keyboardfunctions.

    These all worked, thanks a lot guys I really appreciate it!

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

    Default

    Quote Originally Posted by JoeKlynnbe9 View Post
    These all worked, thanks a lot guys I really appreciate it!
    reason was SMART btw.

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
  •