simulating mouse clicks..


[ Delphi Forum ] [ Delphi Tutorials -- by DelphiLand ]

Posted by Turek on August 11, 2003 at 12:45:23:

SetCursorPos(x, y);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);

this one will click on active window, but i need to do something like
postmessage(wnd, WM_RBUTTONDOWN, 0, 0);
but it clicks when i have cursor in that place wnere i want to click,
postmessage(wnd, WM_RBUTTONDOWN, MK_RBUTTON, MakeLong(x,y));
does the same, and clicks in position where the mouse pointer is, i need it to click on inactive window... what i am makin wrong ??



Related Articles and Replies:


[ Delphi Forum ]
[ DelphiLand: free Delphi source code, tips, tutorials ]