F fansnaf Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-31 #1 能否用程序模拟:每隔一段时间,鼠标单击窗口内某一范围的区域? 使其相当于用鼠标单击。要求:程序自动实现,无需人工干预。请求 圆满答案。另加100份!
X xianjun Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-02 #2 用SendInput或mouse_event 再加一个Timer搞定! 至于上面两个函数的用法,论坛已经贴了很多了 搜索一下。
S sichuan Unregistered / Unconfirmed GUEST, unregistred user! 2003-01-14 #3 procedure TForm1.Timer1Timer(Sender: TObject); begin SetCursorPos(random(1000),screen.Height-60); mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,GetMessageExtraInfo()); Application.ProcessMessages mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,GetMessageExtraInfo()); end;
procedure TForm1.Timer1Timer(Sender: TObject); begin SetCursorPos(random(1000),screen.Height-60); mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,GetMessageExtraInfo()); Application.ProcessMessages mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,GetMessageExtraInfo()); end;