文件名称:delphi_多种鼠标模拟方式
文件大小:985KB
文件格式:RAR
更新时间:2021-08-14 18:23:48
delphi、 鼠标 模拟 找图 找色
delphi_多种鼠标模拟方式 //4种方法模拟 if combobox2.ItemIndex = 0 then begin // 1、发送窗口消息Message //lparam 高16位是y 低16位是 x 算法就是 x+y左移16位 //lparam:=p1.X+ p1.Y shl 16; sendMessage(WinHandle,WM_LBUTTONDOWN,MK_LBUTTON, MAKELPARAM (p1.X, p1.Y)); //鼠标按下 sleep(40); sendMessage(WinHandle,WM_LBUTTONUP, MK_LBUTTON, MAKELPARAM (p1.X, p1.Y)); // 鼠标抬起 end; if combobox2.ItemIndex = 1 then begin // 2. 使用 mouse_event setcursorpos(x0+p1.X,y0+p1.Y); mouse_event(MOUSEEVENTF_LEFTDOWN,x0+p1.X,y0+p1.Y ,0,0); mouse_event(MOUSEEVENTF_LEFTUP,x0+p1.X,y0+p1.Y ,0,0); end; if combobox2.ItemIndex = 1 then begin // 3、 利用sendinput模拟 setcursorpos(x0+p1.X,y0+p1.Y); SLEEP(200); SImouseclick(VK_LBUTTON,40); end; if combobox2.ItemIndex = 1 then begin // 4、WinIo驱动级 setcursorpos(x0+p1.X,y0+p1.Y); MKmouseclick(mcLeft,200); end;
【文件预览】:
yinyangshi
----Unit1.dfm(4KB)
----Project2.exe(412KB)
----dm.dll(804KB)
----Unit1.pas(4KB)
----Project2.~dpr(188B)
----Unit1.dcu(8KB)
----WINIO.VXD(5KB)
----WinIo.dll(48KB)
----Project2.dof(2KB)
----Dm_TLB.dcu(45KB)
----Project2.res(876B)
----SIMouseKeyboard.dcu(9KB)
----Unit1.~dfm(862B)
----MouseKeyboard.dcu(13KB)
----Dm_TLB.pas(73KB)
----Dm_TLB.dcr(32B)
----BitmapData.dcu(18KB)
----Unit1.~pas(2KB)
----BitmapData.pas(36KB)
----SIMouseKeyboard.pas(16KB)
----Unit1.~ddp(51B)
----Project2.cfg(446B)
----Project2.dpr(188B)
----MouseKeyboard.pas(30KB)
----Unit1.ddp(51B)
----WinIo.sys(5KB)