Results 1 to 9 of 9

Thread: Laptop mouse movements! (Lmouse/Lcmouse)!! By Hobbit

  1. #1
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default Laptop mouse movements! (Lmouse/Lcmouse)!! By Hobbit

    Well here are my new functions!

    They move the mouse in a segmented laptop motion(lmouse) and click(lcmouse)
    This will give us a wider range of options when picking way to be less detectable.

    Enjoy!

    Thanks to Nielsie95, Smartzkid and other who helped me out

    Update: increased humanization and authenticity. Moves more like lap top. Mouse strokes stop faster... more sparratic movements. Movement is faster.

    Update 2: Added in MissChance and more humanization.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    {*******************************************************************************
    procedure lmouse(x, y, randomx, randomy, overshot : Integer);
    By: Hobbit with help from Nielsie95 & Smartzkid
    Description: Moves the mouse in a segmented laptop motion.
                 MissChance: The chances of your mouse missing the target and having
                 to correct. So like 1/# of chaces. For example if overshot=50 then
                 there is a 1/50 chance it will overshoot the target.
    *******************************************************************************}


    procedure lmouse(x, y, randomx, randomy, misschance : Integer);
    Var
      cx, cy, seg, e, f, g, nx, ny, zx, zy, hypo : integer;
      a, b, c, randSpeed : extended;
      miss : boolean;
    begin
      MouseSpeed:= RandomRange(14,17);    
      miss:= False;
      if(Random(misschance) = 0) then
        miss:= True;
      e:= 0;
      GetMousePos(cx, cy);
      a:= x - cx;
      b:= y - cy;
      c:= Pow(a,2) + Pow(b,2)
      hypo:= Round(Sqrt(c));
      case hypo of
        0: Exit;
        1..225: seg:=1;
        226..600: seg:= Random(2) + 1;
        601..1800: seg:= random(3) + 2;
        else seg := 5;
      end;
      f:= Round( a / seg);
      g:= Round( b / seg);
      repeat
        Wait(30 + random(50));
    {Begin: Modified from MMouse by Benland100}
        randSpeed:= (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
        if randSpeed = 0.0 then
          randSpeed := 0.1;
        getMousePos(cx,cy);
        nx:= (cx + (f * e)) + random(randomx);
        ny:= (cy + (g * e)) + random(randomy);
    {End: Modified from MMouse by Benland100}
        if(miss = true)then
          begin
            nx:= nx + RandomRange(5,10);
            ny:= ny + RandomRange(5,10);
          end;
        WindMouse(cx,cy,nx,ny,11.0,8.0,10.0/randSpeed,12.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
        e:= e + 1;
      until(e = seg);
      GetMousePos(cx, cy);
      if Distance(x, y, cx, cy) > 5 then
      begin
        Wait(30 + random(30));
        WindMouse(cx,cy,(x + random(randomx)),(y + random(randomy)),11.0,6.0,10.0/randSpeed,15.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
      end;
    end;

    {*******************************************************************************
    procedure lcmouse(x, y, randomx, randomy : Integer; left : Boolean);
    By: Hobbit with help from Nielsie95 & Smartzkid
    Description: Moves the mouse in a segmented laptop motion then clicks
                 MissChance: The chances of your mouse missing the target and having
                 to correct. So like 1/# of chaces. For example if overshot=50 then
                 there is a 1/50 chance it will overshoot the target.
    *******************************************************************************}


    procedure lcmouse(x, y, randomx, randomy, misschance : Integer; left : Boolean);
    Var
      cx, cy, seg, e, f, g, j, nx, ny, o, p, zx, zy, hypo : integer;
      a, b, c, randSpeed : extended;
      miss : boolean;
    begin
      MouseSpeed:= RandomRange(14,17);
      miss:= False;
      if(Random(misschance) = 0) then
        miss:= True;
      e:= 0;
      GetMousePos(cx, cy);
      a:= x - cx;
      b:= y - cy;
      c:= Pow(a,2) + Pow(b,2)
      hypo:= Round(Sqrt(c));
      case hypo of
        0: begin
             Mouse(x,y,0,0,left);
             Exit;
           end;
        1..225: seg:=1;
        226..600: seg:= Random(2) + 1;
        601..1800: seg:= random(3) + 2;
        else seg := 5;
      end;
      f:= Round( a / seg);
      g:= Round( b / seg);
      repeat
        Wait(30 + random(50));
    {Begin: Modified from MMouse by Benland100}
        randSpeed:= (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
        if randSpeed = 0.0 then
          randSpeed := 0.1;
        getMousePos(cx,cy);
        nx:= (cx + (f * e)) + random(randomx);
        ny:= (cy + (g * e)) + random(randomy);
    {End: Modified from MMouse by Benland100}
        if(miss = true)then
          begin
            nx:= nx + RandomRange(16,26);
            ny:= ny + RandomRange(16,30);
          end;
        WindMouse(cx,cy,nx,ny,11.0,8.0,10.0/randSpeed,12.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
        e:= e + 1;
      until(e = seg);
      repeat
        GetMousePos(cx, cy);
        if Distance(x, y, cx, cy) > 5 then
        begin
          Wait(30 + random(30));
          WindMouse(cx,cy,(x + random(randomx)),(y + random(randomy)),11.0,6.0,10.0/randSpeed,15.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
        end;
      until(Distance(x, y, cx, cy) > 5)
      Wait(20 + Random(20));
      GetMousePos(cx, cy);
      HoldMouse(cx + random(3), cy, left);
      repeat
        Wait(20 + Random(30));
        j := j + 1;
      until (j > 4);
      GetMousePos(cx, cy);
      ReleaseMouse(cx, cy, left);
      Wait(100 + Random(100));
    end;

    begin
    end.
    STOP PM'ING ME

  2. #2
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    love it!

  3. #3
    Join Date
    Nov 2006
    Location
    'Pergamino, BA, Argentina';
    Posts
    473
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Nice, very nice idea tho, SCAR is getting better and better, dont let the good work down men ;=)

  4. #4
    Join Date
    Dec 2007
    Posts
    87
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    very nice idea.

  5. #5
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Updated to yet again increase human likeness.
    STOP PM'ING ME

  6. #6
    Join Date
    Sep 2006
    Posts
    199
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I read it and it seems pretty cool but i'm not sure I understand what it is.

    Does it simulate mouse movements as if the user was using a laptop mouse pad?

    Either way good job Hobbit!

  7. #7
    Join Date
    Dec 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Man, nice function!

    As always, sparratic motions and overshoots will definitely help in scripts that require alot of repetitive motions, such as auto fishers and buyers. Sheesh!

    I will definitely use this one. Thank you very much for making such an intuitive function!

    Faelstorm / ProphesyOfWolf

    P.S. Rep ++

    EDIT: I put it into Mouse.scar for the people who would ask "Where do I put it?"

    Also, I capitalized the names of your procedures. I'm picky =P
    Good Peoples!

    The following have saved my account from being hacked! (I so stupid! )
    Hy71194
    p1nky


    I pay with my RS membership using >>>this<<<. Try it! It's free!

    http://www.fenjer.com/adnan/SRL/15/0...20Gatherer.png

  8. #8
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Lovely Hobbit, Add this to SRL.

  9. #9
    Join Date
    Mar 2008
    Location
    The Netherlands
    Posts
    1,395
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Nice job I agree adding this to the Library


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
  •