SRL Archive - General Botting Help

Mousebox


Eejit

2014-05-08 17:30:06

I want to click the mouse with a certain area, I tried using mousebox like this:

MouseBox(720, 150, 750, 180, mouse_left); 

However when compiling there is this error:

Exception in Script: Too many parameters found at line 339, column 33

Where am I going wrong?

masterBB

2014-05-08 18:13:26

From: eejit
Where am I going wrong?


It requires an TBox: https://github.com/SRL/SRL-6/blob/master/lib/core/mouse.simba#L583

var MouseArea: TBox;
...
MouseArea = IntToBox(720, 150, 750, 180);
MouseBox(MouseArea , mouse_left);

or

MouseBox(IntToBox(720, 150, 750, 180), mouse_left);

or
https://github.com/SRL/SRL-6/blob/master/lib/core/mouse.simba#L435
Mouse(720, 150, 30, 30, mouse_left);

Eejit

2014-05-08 18:37:35

From: masterBB
It requires an TBox: https://github.com/SRL/SRL-6/blob/master/lib/core/mouse.simba#L583

var MouseArea: TBox;
...
MouseArea = IntToBox(720, 150, 750, 180);
MouseBox(MouseArea , mouse_left);

or

MouseBox(IntToBox(720, 150, 750, 180), mouse_left);

or
https://github.com/SRL/SRL-6/blob/master/lib/core/mouse.simba#L435
Mouse(720, 150, 30, 30, mouse_left);


Thanks, this worked.

samerdl

2014-05-08 19:58:28

Another useful command:


Mouse(randomrange(720,750), randomrange(150,180),randomrange(-3,3),randomrange(-3,3),mouse_left);

Which is similar to


MouseBox(IntToBox(720, 150, 750, 180), mouse_left);

But with an off set that is between -3 to 3 for both X and Y.

Chris

2014-05-09 05:22:05

From: samerdl
Another useful command:


Mouse(randomrange(720,750), randomrange(150,180),randomrange(-3,3),randomrange(-3,3),mouse_left);

Which is similar to


MouseBox(IntToBox(720, 150, 750, 180), mouse_left);

But with an off set that is between -3 to 3 for both X and Y.



Mouse(randomrange(720,750), randomrange(150,180),randomrange(-3,3),randomrange(-3,3),mouse_left);
I wouldn't recommend that, ie for the X it first gets a random value between 720 and 750, then gets a random value between -3 and 3 and gets a random value between 0 and that number to add to the first value..

I believe MouseBox also aims for the middle of the box, making it more human-like.

Correct me if i'm wrong though

Rich

2014-05-09 12:26:46

From: Chris

Mouse(randomrange(720,750), randomrange(150,180),randomrange(-3,3),randomrange(-3,3),mouse_left);
I wouldn't recommend that, ie for the X it first gets a random value between 720 and 750, then gets a random value between -3 and 3 and gets a random value between 0 and that number to add to the first value..

I believe MouseBox also aims for the middle of the box, making it more human-like.

Correct me if i'm wrong though
I think you're right, but I'm sure Mouse also does the same.

I may also be wrong though…

masterBB

2014-05-09 15:04:19

Mouse(x,y, 10, 10, MOUSE_LEFT);

vs

MouseBox(IntToBox(x, y, x + 10, y + 10), MOUSE_LEFT);


From: Rich
I think you're right, but I'm sure Mouse also does the same.

I may also be wrong though…


You're right that you are wrong :p

procedure mouse(x, y, randX, randY, button: integer = MOUSE_MOVE); overload;
begin
mouse(point(x+random(randX), y+random(randY)), button);
end

MouseBox utilizes a gaussian box for the random spot. So it is more likely to hit the center. Gausian distrubutions aren't completly humanlike, but it is better then a regular random distrubutions.

Victory for MouseBox!

Grunt

2014-05-13 00:31:49

or u could use mmouse , find the center of ur box and +- the bounds