Results 1 to 8 of 8

Thread: Average Ms Per Key Hold.

  1. #1
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default Average Ms Per Key Hold.

    Records How long you hold each key down for and records an works out at the end.

    Code:
    //Type and it will record, To view the results press Control.
    
    Const Display = True;
    
    var a: String;
    
    function HeldFor(c: Char): Integer;
    var e: Integer;
    begin
      e:= GetSystemTime;
      while (IsKeyDown(c)) do Wait(1);
      Result:= (GetSystemTime-e);
    end;
    
    procedure WaitForKeys;
    var i, c, g: Integer;
    begin
      repeat
        for i:= 1 to Length(a) do
        begin
          if (not(IsKeyDown(StrGet(a, i)))) then c:= c + 1;
        end;
        if (c >= Length(a)) then Exit;
        g:= g + 1;
      until(g >= 5);
    end;
        
    
    var i, t: Integer;
    var Ct: array of Integer;
    var s: string;
    begin
      a:= 'abcdefghijklmnopqrstuvwxyz ';
      SetarrayLength(Ct, 1);
      WaitForKeys;
      ClearDebug;
      repeat
        for i:= 1 to Length(a) do
        begin
          if (IsKeyDown(strget(a, i))) then
          begin
            Ct[GetarrayLength(Ct)-1]:= HeldFor(Strget(a, i));
            if (Display) then Writeln('Held ' + Strget(a, i) + ' For ' + Inttostr(Ct[GetarrayLength(Ct)-1]) + ' Ms.');
            SetarrayLength(Ct, GetarrayLength(Ct) + 1);
            Status('Last Pressed ' + Strget(a, i));
            s:= s + Strget(a, i);
          end;
        end;
      until(IsFunctionKeyDown(1));
      for i:= 0 to GetarrayLength(Ct)-1 do
      begin
        t:= t + Ct[i];
      end;
      if (Display) then Writeln(' ');
      Writeln('Typed ' + s);
      Writeln('Average Key Hold ' + Inttostr(t/GetarrayLength(Ct)-1) + ' Ms p/Key.');
    end.

  2. #2
    Join Date
    Feb 2006
    Location
    Under a rock.
    Posts
    1,351
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    You make the most useless, cool, awesome scripts.

    Don't stop.. Ever!
    Edit: What is FunctionKey(1)?
    SRL Developer
    ◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘

  3. #3
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Function Key 1's Control, lol

  4. #4
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    omg, wonderfull, i'm going to use this every day

  5. #5
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    yeah right, who would use this every day

    But this will come in handy

    Nice job kane

    Creds to DannyRS for this wonderful sig!

  6. #6
    Join Date
    Feb 2006
    Location
    Aussie
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    as far as i can see, this is not rubbish/useless this wld be usefull for antiban kinda stuf me thinks.. work out the average key hold and then in the typing functions base each letter arround this

    NICE JOB

  7. #7
    Join Date
    Jun 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Can you make 1 for mouse clicks?

  8. #8
    Join Date
    Feb 2006
    Location
    Under a rock.
    Posts
    1,351
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Also, but about grammar, "{}/?.>,<;:'][\|=-" Etc..
    SRL Developer
    ◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 12
    Last Post: 10-13-2008, 02:57 AM
  2. F Key + Average AutoTalker
    By Rich in forum RS3 Outdated / Broken Scripts
    Replies: 3
    Last Post: 07-26-2008, 09:03 AM
  3. What's your math average?
    By Harry in forum Discussions & Debates
    Replies: 96
    Last Post: 02-27-2008, 08:03 PM
  4. Are you average?
    By R0b0t1 in forum The Bashing Club / BBQ Pit
    Replies: 51
    Last Post: 12-07-2007, 08:08 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
  •