Procedure ClickSomewhere(WindowName, WindowCaption: PChar; X,Y:Integer);
Var
hParent : HWND;
Begin
hParent := FindWindow(WindowName, WindowCaption);
if hParent<>0 Then
Begin
BringWindowToTop(hParent);
Application.ProcessMessages; // not sure that is useful
SendMessage(hParent, BM_CLICK, X,Y);
End;
End;
|