L
liaha
Unregistered / Unconfirmed
GUEST, unregistred user!
我想利用程序模拟MOUSE自动点击IE窗口,现在我已经<br>能够得到IE窗口的HANDLE,得到需要点击的坐标(包括绝<br>对坐标和IE窗口相对坐标),我也SETCURSORPOS,POST<br>WM_LBUTTONDOWN,WM_LBUTTONUP,WM_LBUTTONMOVE消息,<br>但是总是不能成功,请教各位大虾,我是否犯了一些很愚蠢<br>的错误,我的程序如下:<br>PROCEDURE CLICKWINDOW(H: HWND; X,Y: INTEGER); <br>VAR <br> XX, YY: INTEGER<br>BEGIN<br> GETSCREENPOS(H, X, Y, XX, YY); //MYSELF DEFINE PROCEDURE<br> SETCURSORPOS(XX, YY); <br> POSTMESSAGE(HWND, WM_LBUTTONDOWN, 0, MAKELONG(X,Y));<br> POSTMESSAGE(HWND, WM_LBUTTONUP, 0, MAKELONG(X,Y));<br> POSTMESSAGE(HWND, WM_LBUTTONMOVE, 0, MAKELONG(X,Y));<br>EDN;<br><br> 先行谢谢各位了。