Nebula
2012-03-20 21:14:18
Basically Iv'e been working on a fix to the MouseCircle Procedure (it doesn't work anymore).
The code I wrote below only clicks the circumference of the circle, I haven't been able to figure out how to get it to click within the area.

Does anyone know how I could get this to work? [use paint to test it]
Nebula
The code I wrote below only clicks the circumference of the circle, I haven't been able to figure out how to get it to click within the area.
Does anyone know how I could get this to work? [use paint to test it]
program MouseCirclee;
{$i srl/srl.simba}
Procedure MouseCircle2(midx, midy, Radius: integer; button: variant);
var
x, y: Variant;
begin
x := RandomRange((midx - Radius), (midx + Radius + 1));
case Random(2) of
0: y := Round(sqrt(sqr(Radius) - sqr(x-midx)) + midy); //bottom half of circle
1: y := midy + (midy - (Round(sqrt(sqr(Radius) - sqr(x-midx)) + midy))); //top half of circle
end;
writeln(x);
writeln(y);
Mouse(x, y, 0, 0, Button);
end;
begin
repeat
SetupSRL;
activateclient;
Mousecircle2(100, 100, 15, true);
wait(600);
until(false);
end. Nebula