SRL Archive - SRL Archives

i must be really bored. mouse procedures!


Awkwardsaw

2009-07-04 06:20:34


{*******************************************************************************
procedure ClickWait(x, y, rx, ry, time, rtime: integer; left: boolean);
By: akwardsaw
Description:what it does is holds down the button(left or right) for the specified time. to act like your either to lazy to pick your finger up or your about to drag something but change your mind
*******************************************************************************}
procedure ClickWait(x, y, rx, ry, time, rtime: integer; left: boolean);
var a, b: integer;
begin
mmouse(x, y, rx, ry);
getmousepos(a, b);
holdmouse(a, b, left);
wait(time + random(rtime));
releasemouse(a, b, left);
end;

{*******************************************************************************
procedure ClickMistake(x, y, rx, ry: integer; left: boolean);
By: akwardsaw, took some stuff from the mouse procedure
Description:it "accidentally" clicks the wrong mouse button, and corrects itself
*******************************************************************************}
procedure ClickMistake(x, y, rx, ry: integer; left: boolean);
var
a, b, c: Integer;
begin
MMouse(x, y, rx, ry);
Wait(60 + Random(30));
GetMousePos(b, c);
if left then
begin
mouse(b, c, 0, 0, false)
for C := 0 to 3 do
Wait(20 + Random(30));
mmouse(b, c, (25 + random(5)), (25 + random(5)));
mouse(b, c, 0, 0, left);
end else
begin
mouse(b, c, 0, 0, true);
wait(10 + random(50));
mouse(b, c, 0, 0, left);
end;
end;

{*******************************************************************************
procedure ChangeMindMMouse(x, y, rx, ry, time, rtime: integer);
By: akwardsaw
Description: it moves the mouse, but changes its mind and moves back to around its original spot
*******************************************************************************}
procedure ChangeMindMMouse(x, y, rx, ry, time, rtime: integer);
var a, b: integer;
begin
getmousepos(a, b);
mmouse(x, y, rx, ry);
wait(time + random(rtime));
mmouse(a, b, 10, 10);
end;

im not sure if these belong in mouse or antiban, nor am i sure if these are already in srl(didnt find in mouse or antiban) :)

and like i said, i was bored when i made these

Camaro'

2009-07-04 08:03:07

From: akwardsaw

{*******************************************************************************
procedure ClickWait(x, y, rx, ry, time, rtime: integer; left: boolean);
By: akwardsaw
Description:what it does is holds down the button(left or right) for the specified time. to act like your either to lazy to pick your finger up or your about to drag something but change your mind
*******************************************************************************}
procedure ClickWait(x, y, rx, ry, time, rtime: integer; left: boolean);
var a, b: integer;
begin
mmouse(x, y, rx, ry);
getmousepos(a, b);
holdmouse(a, b, left);
wait(time + random(rtime));
releasemouse(a, b, left);
end;

{*******************************************************************************
procedure ClickMistake(x, y, rx, ry: integer; left: boolean);
By: akwardsaw, took some stuff from the mouse procedure
Description:it "accidentally" clicks the wrong mouse button, and corrects itself
*******************************************************************************}
procedure ClickMistake(x, y, rx, ry: integer; left: boolean);
var
a, b, c: Integer;
begin
MMouse(x, y, rx, ry);
Wait(60 + Random(30));
GetMousePos(b, c);
if left then
begin
mouse(b, c, 0, 0, false)
repeat
Wait(20 + Random(30));
c := c + 1;
until (c > 4);
mmouse(b, c, (25 + random(5)), (25 + random(5)));
mouse(b, c, 0, 0, left);
end else
begin
mouse(b, c, 0, 0, true);
wait(10 + random(50));
mouse(b, c, 0, 0, left);
end;
end;

{*******************************************************************************
procedure ChangeMindMMouse(x, y, rx, ry, time, rtime: integer);
By: akwardsaw
Description: it moves the mouse, but changes its mind and moves back to around its original spot
*******************************************************************************}
procedure ChangeMindMMouse(x, y, rx, ry, time, rtime: integer);
var a, b: integer;
begin
getmousepos(a, b);
mmouse(x, y, rx, ry);
wait(time + random(rtime));
mmouse(a, b, 10, 10);
end;

im not sure if these belong in mouse or antiban, nor am i sure if these are already in srl(didnt find in mouse or antiban) :)

and like i said, i was bored when i made these


I like them, try making a procedure that moves a mouse to far, but lets say its moving from the left to right, then have it move to more then right then its suppose to , then fix it self. IT would be difficult to make it look human but would work great.

Awkwardsaw

2009-07-04 08:47:23

i'm pretty sure it has already been made, but hasnt been added. like it miss clicks and corrects itself. if not, i might be able to make a simple(yet not as good, mabey) version real fast and let us dwell on it :P

edit: MissMouse found it :P

also my little scrap up:
program New;
{.include SRL/SRL.scar}

procedure MissMouse(x, y, rx, ry, mx, my: integer; left: boolean);
begin
mmouse(x, y, (rx + mx), (ry + my));
wait(1 + random(50));
mmouse(x, y, rx, ry);
end;

begin
setupsrl;
missmouse(300, 300, 10, 10, 50, 50, true)
end.

try it out :P tbh, its not "too" human like, but it misses the target and goes back to it. i modded it to mmouse to test it.

and, laptopmouse does the same thing :D

Nava2

2009-07-04 09:01:06

I like the Change Mind thing :)

Awkwardsaw

2009-07-04 09:30:31

thanks nava :D

also, thanks for the people who gave me teh cup =D avy now pl0x?

ZaSz

2009-07-04 09:43:28

repeat
Wait(20 + Random(30));
c := c + 1;
until (c > 4);
to

for C := 0 to 3 do
Wait(20 + Random(30));

Awkwardsaw

2009-07-04 09:45:30

oo you can do that? i always thought for-to-do was just for arrays

ZaSz

2009-07-04 10:06:32

nope they work for anything

Awkwardsaw

2009-07-04 10:14:30

alright, gonna change that now then

Floor66

2009-07-04 12:02:26


Program New;
{.include SRL/SRL.scar}

Procedure MissMouse(x, y, rx, ry, mx, my, m_Randomness : Integer; Left : Boolean);
Begin
If (m_Randomness > mx) Or (m_Randomness > my) Then
Begin
WriteLn('MissMouse \ ERROR -> Randomness can''t be bigger than mx/my.');
Exit;
End;
mx := RandomRange(mx - m_Randomness, mx + m_Randomness);
my := RandomRange(my - m_Randomness, my + m_Randomness);
MMouse(x, y, (rx + mx), (ry + my));
Wait(1 + random(50));
MMouse(x, y, rx, ry);
End;

Begin
SetupSRL;
Repeat
{ x y rx ry mx my m_Rnd Left}
MissMouse(300, 300, 5, 5, 50, 50, 45, True);
Wait(500);
Until(IsFKeyDown(11));
End.

Check that out. Added randomness to the missing.

Tickyy

2009-07-04 12:41:31

Your doing better and better each time, i like seeing people contributing to SRL….

Wanna do something together someday :p?

Awkwardsaw

2009-07-04 18:19:01

From: Floor66

Program New;
{.include SRL/SRL.scar}

Procedure MissMouse(x, y, rx, ry, mx, my, m_Randomness : Integer; Left : Boolean);
Begin
If (m_Randomness > mx) Or (m_Randomness > my) Then
Begin
WriteLn('MissMouse \ ERROR -> Randomness can''t be bigger than mx/my.');
Exit;
End;
mx := RandomRange(mx - m_Randomness, mx + m_Randomness);
my := RandomRange(my - m_Randomness, my + m_Randomness);
MMouse(x, y, (rx + mx), (ry + my));
Wait(1 + random(50));
MMouse(x, y, rx, ry);
End;

Begin
SetupSRL;
Repeat
{ x y rx ry mx my m_Rnd Left}
MissMouse(300, 300, 5, 5, 50, 50, 45, True);
Wait(500);
Until(IsFKeyDown(11));
End.

Check that out. Added randomness to the missing.


i like it :) thanks

From: tikky
Your doing better and better each time, i like seeing people contributing to SRL….

Wanna do something together someday ?
sure :P