Sandstorm
2008-10-19 20:10:05
Human Mouse.
I thought it might be useful, because a human doesn't send the mouse to the point at the EXACT same speed, they slow down a bit. Mmouse and Mouse are used, so SRL has to be used with it.
Use:
HMouse(X, Y, Rx, Ry, Click, Left)
x, y, rx, ry are the same as in Mouse/Mmouse. Click is whether or not to click. Left is left or right click.
What is does:
1. Gets starting Mouse speed, logs it as Startspeed.
2. Moves mouse within 20-25 pixels of object.
3. Reduces Mouse speed, by 5.
4. Read #2, within 10-15 pixels of object.
5. Read #3.
6. Clicks object, or just leaves mouse there, depending on settings.
7. Reverts Mouse speed to Startspeed.
Here it is:
HBMouse is for when the mouse is below the item. HAMouse for above.
The color I used in FindColorTolerance to test it is the cork on a Vial.
Things I'd like to work on:
Effectiveness. Right now it has the same mousespeed reduction. I'm going to change that, since it's not hard + makes it less detectable then the speed always reducing by the same. Expect an edit soon.
The length. Right now, it's grossly overgrown. I'm gonna see if I can change this. Any suggestions?
Also, looking for feedback on the procedure itself :). This is my first selfmade one, but I think it works decently and is useful.
~Sandstorm
Edit:
Sorry for the ugly code! Updated it :).
Edit Two:
Updated it - it's now got inbuilt detection - only four (one being Wait) procedures called in the Mainloop now!
Added in Right Clicking capability.
Still looking at same x/y axis detectability, if I can do it.
I thought it might be useful, because a human doesn't send the mouse to the point at the EXACT same speed, they slow down a bit. Mmouse and Mouse are used, so SRL has to be used with it.
Use:
HMouse(X, Y, Rx, Ry, Click, Left)
x, y, rx, ry are the same as in Mouse/Mmouse. Click is whether or not to click. Left is left or right click.
What is does:
1. Gets starting Mouse speed, logs it as Startspeed.
2. Moves mouse within 20-25 pixels of object.
3. Reduces Mouse speed, by 5.
4. Read #2, within 10-15 pixels of object.
5. Read #3.
6. Clicks object, or just leaves mouse there, depending on settings.
7. Reverts Mouse speed to Startspeed.
Here it is:
program New;
{.include srl/srl.scar}
var
x, y, xx, yy: integer;
procedure HMouse(x, y, Randx, Randy: integer; click, left: boolean);
var
Startspeed: integer;
begin
Startspeed := MouseSpeed;
WriteLn('Mouse speed is: ' + IntToStr(MouseSpeed));
WriteLn('X is: ' + IntToStr(x) + ' Y is: ' + IntToStr(y));
Xx := x;
Yy := y;
GetMousePos(x, y);
if (x < Xx) and (y < yy) then
begin
x := Xx
y := Yy
WriteLn('Mouse speed: ' + IntToStr(Mousespeed));
WriteLn('Above');
wait(1)
Mmouse(x - 20 - random(5), y - 20 - random(5), Randx, Randy);
Mousespeed := Mousespeed - 5 - random(2);
WriteLn('Mouse speed: ' + IntToStr(Mousespeed));
wait(1)
Mmouse(x - 10 - random(5), y - 10 - random(5), Randx, Randy);
Mousespeed := Mousespeed - 5 - random(2);
WriteLn('Mouse speed: ' + IntToStr(Mousespeed));
wait(1)
if Click then
begin
if Left then
begin
Mouse(x, y, Randx, Randx, true);
end else
Mouse(x, y, Randx, Randx, false);
end else
Mmouse(x, y, Randx, Randx);
MouseSpeed := StartSpeed;
end else
begin
x := Xx
y := Yy
WriteLn('Below');
wait(1);
Mmouse(x + 20 + random(5), y + 20 + random(5), Randx, Randy);
Mousespeed := Mousespeed - 5 + random(2);
WriteLn('Mouse speed is: ' + IntToStr(MouseSpeed));
wait(1)
Mmouse(x + 10 + random(5), y + 10 + random(5), Randx, Randy);
Mousespeed := Mousespeed - 5 + random(2);
WriteLn('Mouse speed is: ' + IntToStr(MouseSpeed));
wait(1)
if Click then
begin
if Left then
begin
Mouse(x, y, Randx, Randx, true);
end else
Mouse(x, y, Randx, Randx, false);
end else
Mmouse(x, y, Randx, Randx);
MouseSpeed := StartSpeed;
end;
end;
begin
Setupsrl;
Mousespeed := 15
Wait(1000)
if FindColorTolerance(x, y, 3428189, MIX1, MIY1, MIX2, MIY2, 10) then
HMouse(x, y, 3, 3, True, True);
end.
HBMouse is for when the mouse is below the item. HAMouse for above.
The color I used in FindColorTolerance to test it is the cork on a Vial.
Things I'd like to work on:
Effectiveness. Right now it has the same mousespeed reduction. I'm going to change that, since it's not hard + makes it less detectable then the speed always reducing by the same. Expect an edit soon.
The length. Right now, it's grossly overgrown. I'm gonna see if I can change this. Any suggestions?
Also, looking for feedback on the procedure itself :). This is my first selfmade one, but I think it works decently and is useful.
~Sandstorm
Edit:
Sorry for the ugly code! Updated it :).
Edit Two:
Updated it - it's now got inbuilt detection - only four (one being Wait) procedures called in the Mainloop now!
Added in Right Clicking capability.
Still looking at same x/y axis detectability, if I can do it.