Results 1 to 5 of 5

Thread: Need Help

  1. #1
    Join Date
    Jul 2014
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Need Help

    I am trying to hold the backspace button for a certain time and it just will not do it. I mean it will backspace one char but, then stop.

    Using :

    KeyDown(8);
    Wait(2500);
    KeyUp(8);

    What am I doing wrong and any suggestions / help. Please and thank you.

  2. #2
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Deific View Post
    I am trying to hold the backspace button for a certain time and it just will not do it. I mean it will backspace one char but, then stop.

    Using :

    KeyDown(8);
    Wait(2500);
    KeyUp(8);

    What am I doing wrong and any suggestions / help. Please and thank you.
    Why would you want to do that?

    Simba Code:
    repeat
      typeByte(VK_SPACE);
    until false;

  3. #3
    Join Date
    Jul 2014
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    Why would you want to do that?

    Simba Code:
    repeat
      typeByte(VK_SPACE);
    until false;
    How do I make that 'false' into something like wait(50);

    I just need it to backspace for a couple ms

  4. #4
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    OP, your current code will:
    Code:
    Push the key down
    Wait 2 and a half seconds
    Release the key

    To push it for as long as you want, try something like this:

    Simba Code:
    procedure backspace();
    var
      t:TTimeMarker;
    begin
      t.start();
      repeat
       keyDown(8);
       wait(100);
       keyUp(8);
      until (t.getTime() > 10000); //change 10000 to whatever your time limit should be
    end;

    You could even do it based on key presses, say you want to backspace 10 characters, you could do this:

    Simba Code:
    procedure backspace();
    var
      i:integer;
    begin
      repeat
       keyDown(8);
       wait(100);
       keyUp(8);
       inc(i);
      until (i >= 10); //this will allow it to press they key 10 times
    end;
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  5. #5
    Join Date
    Jul 2014
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I appreciate all the help fellas. I needed this, I am making a flawless relogger for a rsps. Thanks

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
  •