PDA

View Full Version : [REQ] Mouse in box



Boreas
11-19-2006, 11:35 PM
I need someone to write a procedure that moves the mouse around randomly in a box defined in the parameters, until a global boolean is true, like a bored human would. If you can't do the boolean thing, then just time in ms. Will be used in something very cool, you'll of course be in he credits. Dinner time, I'll explain more when I get back.

masquerader
11-19-2006, 11:40 PM
procedure MouseBox(xs, ys, xe, ye: Integer; click: Integer);

lol

Ransom
11-19-2006, 11:45 PM
procedure MouseBox(xs, ys, xe, ye: Integer; click: Integer);
By: XxKanexX
Description:
Moves mouse into a random position in the box. Clicks if told to.

like this one? it's in MouseFlag. I can make you one if you really want to

Rick
11-20-2006, 12:00 AM
I made one. It moves the mouse in the client (tell me if it does what you want)


procedure boxmouse(LastingTime:integer);
var
Width, Height,LT: Integer;
StartTime: Integer;
begin
LT:=LastingTime;
GetClientDimensions(Width, Height);
StartTime:= GetTickCount;
repeat
MoveMouseSmoothEx(Random(Width),Random(Height),100 ,100,30,20,10);
until(GetTickCount - StartTime > LT);
end;

Is that what you mean?

Boreas
11-20-2006, 12:28 AM
masq and ransom, that moves the mouse to a spot. I mean move around randomly, like make a scribble, I'll attach a picture soon.

r!ch!e, yea that's kinda what I meant, except confined to a box, and smoother.

Rick
11-20-2006, 12:40 AM
i have a few questions

1) is the box the client? or a specified box?
2)By 'Smoother' do you mean less detectable, more curved lines, or...what?

Boreas
11-20-2006, 12:49 AM
Box is like
x1,y1---------------------------------------
|................................................. .....|
|................................................. .....|
|................................................. .....|
|................................................. .....|
|................................................. .....|
|................................................. .....|
----------------------------------------x2,y2

And smoother as in 1 continous line

rename attachment as .bmp

Rick
11-20-2006, 01:48 AM
client dimensions are easy.
or
would a procedure where you place the co-ords of the box be alright.

e.g

boxmouse(x1,y1,x2,y2,lastingtime : integer);

Also the bitmap you attatched doesnt work,display (wotever you want to call it)

Boreas
11-20-2006, 01:50 AM
yea like that