Results 1 to 23 of 23

Thread: funtion TypeHuman(Test:String;MilisecondPerLett:Integer):S tring;

  1. #1
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default funtion TypeHuman(Test:String;MilisecondPerLett:Integer):S tring;

    I don't think this has been created before, but it allows the user to input how many milliseconds they type per each letter so it equals less bannage of players. I really do hope this gets into SRL, i am always trying and hoping so my includes would

    Information:
    SCAR Code:
    {*******************************************************************************
    function TypeHuman(Text:String;MillisecondPerLetter:Integer):String;
    By: IP-Drowner
    Description: Types text human-like. Set MillisecondPerLetter to how many
                 many milliseconds it takes for you to type 1 letter in a word.
    *******************************************************************************}

    Usage:
    SCAR Code:
    TypeHuman('Hello', 30);

    The Code:
    SCAR Code:
    function TypeHuman(Text:String;MillisecondPerLetter:Integer):string;
    var
      i: Integer;
    begin
      i:= 1;
      repeat
        Wait(Random(MillisecondPerLetter) + 50);
        SendKeys(Copy(Text, i, 1));
        i:=i+1;
      until(i>Length(Text));
    end;

    Well, how do you guys like it. Feedback is appreciated
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  2. #2
    Join Date
    Feb 2007
    Location
    Toronto, Ontario, Canada
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Good work, but don't you think TypeSend is safe enough?

  3. #3
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by A G E N T 83 View Post
    Good work, but don't you think TypeSend is safe enough?
    Yes, but this one you can set the typing speed. So, instead of slower typing, somebody could input their own millisecond per letter so it types just like them
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  4. #4
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    tat is not how mumans type. there is a ryhtm and patern bassed upon were the keys are located. there are also diferent lengths of pauses before words, and even sentances, depending on what is next. and also for most peope., there is a specific pattern of backspaces and misspellings form mispressing certain keys wrong.

    but, ignorning all of this, it's not a bad method, good job.

    also, your miliisecond per letter input is not accurate. as it is really 50, and the random part is your input.

    SCAR Code:
    Wait(Random(MillisecondPerLetter) + 50);
    i would have at least done something like
    SCAR Code:
    Wait(
      Random(
        (MillisecondPerLetter / 4)
      )
     + (MillisecondPerLetter-(MillisecondPerLetter/8))
    );
    ;
    that way it will wait the milliseconds plus or minus 25%.
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  5. #5
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Just to let you know, SendKeys pushes the key down and releases it faster than any human

  6. #6
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    mind doing the research and tell us exactly what the miliseconds is?

    because i dont belive that, if it really was faster than ANY human, every typing scar script wold be banned by now.
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  7. #7
    Join Date
    Feb 2007
    Location
    Toronto, Ontario, Canada
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bullzeye95 View Post
    Just to let you know, SendKeys pushes the key down and releases it faster than any human
    Yes, but TypeSend() is somewhat slower; I did a little test and for the phrase "The quick brown fox jumps over the lazy old dog.",
    TypeSend took 7359 ms, and SendKeys returned 0 ms!

  8. #8
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by LordGregGreg View Post
    mind doing the research and tell us exactly what the miliseconds is?

    because i dont belive that, if it really was faster than ANY human, every typing scar script wold be banned by now.
    What script are you talking about, that uses SendKeys?

  9. #9
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I think he's asking you to test the speed of "SendKeys". If I get this right, Greg believes that TypeSend uses SendKeys. Which it doesn't. TypeSend is almost 100% safe. It has random times between clicks, and has a random timing between pressing down a key and releasing it.

    -Knives

  10. #10
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    I went and looked at TypeSend for all of you, and it doesn't use SendKeys. Why would it? It uses the SRL function TypeByte, and that uses KeyDown/KeyUp with a wait in between. (The function SendText uses SendKeys though... Its by RSN)


    What our friend here is trying to re-create is the function TypeSend, but with a variable added to it to improve un-detectability.

    Heres my version, with all the fixes applied to his. (When you compile a "for" loop, the compiler makes it a while loop anyway. In this code, you could forget the "I:= 1" at the beginning and just put "Inc(I)" at the beginning.)

    SCAR Code:
    function TypeHuman(Text: String; WaitTime: ShortInt): String;
    var
      I, B: Byte;
      NeedShift: Boolean;
    begin
      I:= 1;
      B:= Length(Text);
      while (I <= B) do
      begin
        NeedShift := (Text[i] = ':') or (Text[I] = '!') or (Text[I] = '+') or
                 (Text[I] = '?') or (Text[I] = '<') or (Text[I] = '>') or
                 (Text[I] = '@') or (Text[I] = '#') or (Text[I] = '$') or
                 (Text[I] = '&') or (Text[I] = '%') or (Text[I] = '*');
        if (NeedShift) then KeyDown($10);
        (*This part presses the key*)
        KeyDown(GetKeyCode(Text[I]));
        Wait(20 + random(WaitTime));
        KeyUp(GetKeyCode(Text[I]));
        Wait(20 + random(WaitTime));
        (*-------------------------*)
        if (NeedShift) then
        begin
          KeyUp($10);
          Wait(20 + random(50));
        end;
        Wait(WaitTime + random(500));
        KeyDown($D);
        Wait(random(WaitTime) + random(20));
        Inc(I);
      end;
    end;

    I used a a Byte because no line is more than 255 characters, and you can't type that many characters into runescape anyway.


    EDIT: And creating a method to randomly generate a new person's typing is unconventional. TypeSend has proved itself, yes? It would be more work than the result is worth to create a system like that. Even if you simply include all of the factors from the key's closeness, still takes more work than you could possibly get from its result.


    EDIT:

    Excerpt from Text.scar

    SCAR Code:
    {*******************************************************************************
    procedure TypeByte(k: Byte);
    By: Mutant Squirrle
    Description: Types one char.
    *******************************************************************************}


    procedure TypeByte(k: Byte);
    begin
      KeyDown(k);
      Wait(10 + Random(50));
      KeyUp(k);
    end;

    {*******************************************************************************
    procedure TypeSend(Text: String);
    By: Mutant Squirrle
    Description: Types text humanlike using random timeing on keys.
    *******************************************************************************}


    procedure TypeSend(Text: string);
    var
      i: Integer;
      Shift: Boolean;
    begin
      for i := 1 to Length(Text) do
      begin
        Shift := (Text[i] = ':') or (Text[i] = '!') or (Text[i] = '+') or
          (Text[i] = '?') or (Text[i] = '<') or (Text[i] = '>') or
          (Text[i] = '@') or (Text[i] = '#') or (Text[i] = '$') or
          (Text[i] = '&') or (Text[i] = '%') or (Text[i] = '*');
        if (Shift) then
        begin
          KeyDown(VK_Shift);
          Wait(5 + Random(20));
        end;
        TypeByte(GetKeyCode(Text[i]));
        if (Shift) then
        begin
          KeyUp(VK_Shift);
          Wait(5 + Random(20));
        end;
        Wait(50 + Random(120));
      end;
      Wait(200 + Random(500));
      TypeByte(13);
    end;
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  11. #11
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by King of Knives View Post
    Greg believes that TypeSend uses SendKeys. Which it doesn't.
    this is true, sorry for the mishap XD
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  12. #12
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    @Robot: Aaaand all that can be solved by changing the wait value in your own TypeByte in SRL


    EDIT: Btw

    SCAR Code:
    Wait(10 + Random(50));

    That is from TypeByte and its just fine.

    10ms is a really quick hit of the button, but 59ms then again is a lot slower.

    We are doing just fine atm

  13. #13
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    And i highly doubt that jagex goes around marking for how long our key presses are.

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  14. #14
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    I dunno, I've seen flash games that do it.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  15. #15
    Join Date
    Jul 2007
    Posts
    1,055
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea guess lol. If you haven't checked out TypeSend it does exactly this...It does random 50-100miliseconds per letter. Well at least I'm prety sure thats wht it does. I forgot, I'v looked at it before. I'm too lazzy to check if I'm right.

  16. #16
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by JuKKa View Post
    And i highly doubt that jagex goes around marking for how long our key presses are.
    How does Jagex bans/mutes peoples?

    Lottery?

    EDIT:
    Of course their not, but they do got system what's detects autotyping...
    I mean, some peoples have got muted for bad bad exe autotalkers...
    or it's just me...haven't sleeped like 15 hours...uhmmm I got really bad sleeping traditions, I waked up at 3 or 4 pm yesterday...

    err...player reports?
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  17. #17
    Join Date
    Jul 2007
    Location
    Mo-Town
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Somebody should do some kind of test to see how long a human really holds down a key while they are typing. I know SendKeys is instant which is why it gets you banned because they have a system to detect it. I have used a .exe autotyper that sent instantly and I never got banned but maybe I'm just lucky.

    (well... I got muted twice for spamming with it but thats because I was spamming random things like "red:wave2:....................................... .......*" While I was fishing and a couple people got mad...)
    Quote Originally Posted by Napolean
    In Politics, Stupidity is Not a Handicap
    Quote Originally Posted by Unknown
    Marriage is like a bank. You put it in, Pull it out, then lose interest.

  18. #18
    Join Date
    Jul 2007
    Posts
    1,055
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    When I was telling my mod friend about an auto spamer (spamming a website) he is like ill brt. Within 2mins (before the mod came) it got muted. He said it was probably our new system that blocks those kinda people. Just some info.

  19. #19
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Screen shots or it didn't happen
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  20. #20
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    If I could be sure that my army would be only muted, not banned, I would go SendKeys a bit so they couldn't blame me of not responding to "mining lvlz?"

  21. #21
    Join Date
    Jul 2007
    Posts
    1,055
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Accidently double posted.
    Read post below.

  22. #22
    Join Date
    Jul 2007
    Posts
    1,055
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    R0b0t1, ight, I'll talk to him again about it. This time I'll even try and get more information WITH ss.

  23. #23
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    But for newbie people, they wouldn't understand how to open that file and what to edit. While TypeHuman includes that millisecond plus a random amount of milliseconds after that. But i highly doubt that each key pressed is monitored. If it is, then stick with KeyDown and KeyUps.

    Also, thanks R0bot1 as another way to do this function.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 03-30-2008, 01:40 PM
  2. integer to string?
    By eFox in forum OSR Help
    Replies: 4
    Last Post: 10-20-2007, 06:55 PM
  3. function SendKeyboard(FKey:Integer; Text:String): Integer;
    By Daniel in forum Research & Development Lounge
    Replies: 4
    Last Post: 07-18-2007, 04:28 PM

Posting Permissions

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