Page 1 of 1

automatic mouse move and click

PostPosted: November 28th, 2005, 4:11 am
by emiliano
Hi everyone, I've come across something a bit challenging and wondering if you could give me a hand.

Does anyone know how to go about creating a piece of simple software that automatically moves the mouse pointer on the screen and clicks at certain coordinates periodically? The added challenge is to get the above happening not on a form but on the desktop or on another window, such as an IE window.

Thanks for any help or ideas,

- Emiliano

PostPosted: November 28th, 2005, 11:01 am
by Edwin
Hi EMiliano,

Maybe this will help?

uses
..., Windows, Controls;

procedure ...GoToDescTopPos(ADescTopPosX, ADescTopPosY:Integer);
var
Pos:TPoint;
begin
Pos.X := ADescTopPosX;
Pos.Y := ADescTopPosY;
Mouse.CursorPos := ClientToScreen(Pos);
end;

...

Succes,
Edwin