Results 1 to 4 of 4

Thread: Click Averager

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

    Default Click Averager

    Meh -.- Just set the Px and Py and it calculates the number of clicks it can make it bla bla bla. Just look at the progress report after

    Code:
    Const
      TripleCheck = true; // Average will be more acurate, but will click for longer to acumulate.
      Px = 20;
      Py = 20;
    
    var ClickSpeed: array of extended;
    
    function ClickATime(x, y: Integer): extended;
    var a: Integer;
    begin
     a:= GetSystemtime;
       HoldMouse(x, y, true);
       wait(1);
       ReleaseMouse(x, y, true);
       Wait(1);
     result:= (GetSystemTime-a);
    end;
    
    function Average: extended;
    var i, l: Integer;
        t: extended;
    begin
     l:= getarraylength(clickspeed)-1;
     for i:= 0 to l do
       t:= t + clickspeed[i];
     result:= ((t+1)/(l+1));
    end;
    
    procedure Clickfor(x, y, ms: Integer);
    var a, i: Integer;
    begin
     a:= GetSystemTime;
      repeat
        ClickSpeed[i]:= ClickATime(x, y);
        setarraylength(ClickSpeed, i + 2);
       i:= i + 1;
      until((getsystemtime-a) >= ms);
    end;
    
    function AddC(c: integer): string;
    var i, e: Integer;
        s: string;
    begin
     s:= inttostr(c);
      for i:= 1 to length(s) do
     begin
        if e = 3 then
       begin
         e:= 0;
        result:= result + ',';
       end;
      result:= result + copy(s, i, 1);
      e:= e + 1;
     end;
    end;
    
    function AddCE(ec: extended): string;
    var i, e: Integer;
        s: string;
    begin
     s:= floattostr(ec);
      for i:= 1 to length(s) do
     begin
        if e = 3 then
       begin
         e:= 0;
        result:= result + ',';
       end;
      result:= result + copy(s, i, 1);
      e:= e + 1;
     end;
    end;
    
    function CopyMuchE(e: extended; frompoint: integer): extended;
    var s, b: string;
        fp: integer;
    begin
     s:= floattostr(e);
     repeat
       fp:= fp + 1;
      b:= b + copy(s, fp, 1);
     until(copy(b, fp, 1)='.');
      result:= strtofloat(b) + strtofloat(copy(s, fp, frompoint + 1));
    end;
    
    var Psecond, i, s: Integer;
        AveragePS: extended;
        Triple: array[1..3] of extended;
    begin
     s:= GetSystemTime;
      ClearDebug;
      Setarraylength(Clickspeed, 1);
      if TripleCheck then
     begin
       for i:= 1 to 3 do
      begin
        Clickfor(Px, Py, 1000);
       Triple[i]:= average;
      end;
       AveragePS:= ((Triple[1]+Triple[2]+Triple[3])+1)/3;
     end else
      begin
        Clickfor(Px, Py, 1000);
       AveragePS:= average;
      end;
     PSecond:= getarraylength(clickspeed)-1;
      Writeln('Test took: '+floattostr(((getsystemtime-s)))+' milli seconds.. ('+floattostr(((getsystemtime-s)/1000))+' seconds).');
      Writeln('Clicks per: Second ('+AddC(psecond)+'), Minute ('+AddC(psecond*60)+'), Hour ('+AddC((psecond*60)*60)+'), Day ('+AddC(((psecond*60)*60)*24)+').');
      Writeln('Average Millisecond per click: '+floattostr(CopyMuchE(AveragePS, 3)));
      Writeln(' ');
    end.

  2. #2
    Join Date
    Feb 2006
    Location
    Berkeley, CA
    Posts
    1,837
    Mentioned
    52 Post(s)
    Quoted
    60 Post(s)

    Default

    Is this for testing computer speed? I got 4.238 ms per click myself...

  3. #3
    Join Date
    Feb 2006
    Posts
    1,022
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I didn't set px and py. Closed firefox.

    Test took: 3000 milli seconds.. (3 seconds).
    Clicks per: Second (209), Minute (125,40), Hour (752,400), Day (180,576,00).
    Average Millisecond per click: 5.113

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

    Default

    Quote Originally Posted by BenLand100
    Is this for testing computer speed? I got 4.238 ms per click myself...
    It clicks for 1 second, every click is counted via how long it took in ms and then added to an array. Once its done, the arrays are added together and then divided by however many there are.

    But clicks per ms just means the average of ms per click.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find a Chest & Left Click,Right Click
    By yanix in forum OSR Help
    Replies: 3
    Last Post: 10-03-2007, 06:40 PM
  2. Right Click
    By HarryJames in forum OSR Help
    Replies: 2
    Last Post: 03-22-2007, 08:16 PM
  3. how would i get it to click this?
    By seany in forum OSR Help
    Replies: 6
    Last Post: 03-02-2007, 07:06 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
  •