TomTuff
2011-02-01 00:22:12
{*******************************************************************************
procedure MouseOffScreen(MinimumWait, RandomWait: Integer);
By: TomTuff
Description: Uses MMouse() to move the mouse somewhere off the screen
*******************************************************************************}
procedure MouseOffScreen(MinimumWait, RandomWait: Integer);
var
w, h: Integer;
Pt: TPoint;
begin
GetClientDimensions(w, h);
repeat
Pt := Point(RandomRange(-w, 2 * w), RandomRange(-h, 2 * h));
until(not(PointInBox(Pt, IntToBox(0, 0, w, h))));
MMouse(Pt.x, Pt.y, 0, 0);
Wait(MinimumWait + Random(RandomWait));
end;It's simple, but good antiban IMO. Use it if you wish :spot: