Results 1 to 6 of 6

Thread: Backspace?

  1. #1
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Backspace?

    How can i have the script delete what it typed out?

    Such as, it types "my wc is 20.", but doesn't press enter and instead "presses" backspace to take it out

    Note: Need it for my antiban procedure below:

    SCAR Code:
    4: begin
            a := 0+random(150);
            b := 0+random(100);
            c := a / b;
            if c < 20 then
            begin
              case random(10) of
              0: text := 'i pwn you all';
              1: text := 'rs is so cool!!1!';
              2: text := 'i am a wc pro.';
              end;
              TypeSendEx(text, False);
            end else
            begin
              Writeln('INFO/ANTIBAN: Number was larger than 20; doing other antiban.');
              if GameTab(30) then
              begin
                Mmouse(x, y, 10, 10);
                wait(100+random(1500));
                GameTab(25);
              end else
              Writeln('INFO: **Error** Unable to open friends list; exiting.');
              FindNormalRandoms;
            end;
         end;
    .
    Last edited by DeSnob; 05-13-2010 at 11:50 PM.

  2. #2
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Well, after TypeSendEx just use:
    SCAR Code:
    procedure BackspaceText(s : string; delay : integer);
    var
      i, l : integer;
    begin
      l := length(s);
      if l = 0 then
        exit;
      for i := 1 to l do
      begin
        TypeByte(VK_BACK);
        Wait(delay + random(20));
      end;
    end;
    Or some shit like that.
    Last edited by Sex; 05-14-2010 at 12:23 AM.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  3. #3
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    1. detect length of string, put value as int A

    2. make an "for i:=0 to A do" loop, incrementing "i" each time the backspace key is pressed (ch8 - i believe) (just TypeSendEx it)

  4. #4
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    TypesendEx(Replicate(Chr(VK_Back), 8), False);
    Change 8 to the number of times to hit backspace

  5. #5
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Oh, you could also use this :
    SCAR Code:
    procedure BSText(s : string);
    begin
      TypeSendEx(s + replicate(chr(VK_BACK), length(s)), False);
    end;
    Last edited by Sex; 05-14-2010 at 12:37 AM.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  6. #6
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Sex View Post
    Oh, you could also use this :
    SCAR Code:
    procedure BSText(s : string);
    begin
      TypeSendEx(s + replicate(chr(VK_BACK), length(s)), False);
    end;
    Exactly what i wanted Ty

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
  •