Hobbit
2008-06-28 11:09:43
Here is the new function i have been creation.
*Hears whispers in the background "OMG HOBBIT IS ACTUALLY USING SCAR"*
Anyways the new function is to give the same segmented strokes while moving the mouse as that of a laptop. It decides how many strokes to do depending on the distance being traveled.
Now the problem is… it isn't moving correctly… Ill let you run it yourself and you will see what I mean…. and just be patient with it… it will get there… and look in the debug… that may help you (once it gets there).
*Hears whispers in the background "OMG HOBBIT IS ACTUALLY USING SCAR"*
Anyways the new function is to give the same segmented strokes while moving the mouse as that of a laptop. It decides how many strokes to do depending on the distance being traveled.
Now the problem is… it isn't moving correctly… Ill let you run it yourself and you will see what I mean…. and just be patient with it… it will get there… and look in the debug… that may help you (once it gets there).
program New;
{.include SRL/SRL.scar}
procedure lmouse(x, y, randomx, randomy : Integer);
Var
cx, cy, seg, e, f, g, nx, ny, hypo : integer;
a, b, c : extended;
begin
e:= 0;
GetMousePos(cx, cy);
a:= (x - cx);
b:= (y - cy);
c:=Pow(a,2) + Pow(b,2)
hypo:= Round(Sqrt(c));
Writeln(IntToStr(hypo));
if(hypo = 0) then
begin
Writeln('[ERROR]: One of your "lmouse()" commands is not filled out correctly');
Writeln('Distance moved cannot = 0!');
end;
case hypo of
0: TerminateScript;
1..50: seg:=1;
51..150: seg:= 2;
151..300: seg:= Random(2) + 3;
301..1800: seg:= random(3) + 4;
end;
if(seg > 1)then
begin
f:= Round( a / seg);
g:= Round( b / seg);
repeat
Wait(1000);
MMouse((cx + f), (cy + g), Random(10), Random(10));
e:= e + 1;
Writeln(inttostr(e));
until(e = (seg - 1))
MMouse((cx + f), (cy + g), randomx, randomy);
end;
if(seg = 1)then
MMouse(x, y, randomx, randomy);
end;
begin
lmouse(1,1,4,3);
end.