delphi7如果模拟鼠标点击指定坐标链接 20
procedureTForm1.Button4Click(Sender:TObject);beginform1.Caption:='点击';timer3.Enabled:...
procedure TForm1.Button4Click(Sender: TObject);
begin
form1.Caption:='点击';
timer3.Enabled:=false;
SendMessage(GetWindow(GetWindow(WebBrowser1.Handle, GW_CHILD), GW_CHILD),WM_LBUTTONDOWN,
////MK_LBUTTON, MAKELONG(strtoint(edit2.Text),strtoint(edit3.Text)));
MK_LBUTTON, MAKELONG(nx,ny));
sleep(500);
SendMessage(GetWindow(GetWindow(WebBrowser1.Handle, GW_CHILD), GW_CHILD),WM_LBUTTONUP,
////MK_LBUTTON, MAKELONG(strtoint(edit2.Text),strtoint(edit3.Text)));
MK_LBUTTON, MAKELONG(nx,ny)) ;
PostMessage(GetWindow(GetWindow(WebBrowser1.Handle, GW_CHILD), GW_CHILD),WM_LBUTTONDOWN,
////MK_LBUTTON, MAKELONG(strtoint(edit2.Text),strtoint(edit3.Text)));
MK_LBUTTON, MAKELONG(nx,ny));
sleep(500);
PostMessage(GetWindow(GetWindow(WebBrowser1.Handle, GW_CHILD), GW_CHILD),WM_LBUTTONUP,
////MK_LBUTTON, MAKELONG(strtoint(edit2.Text),strtoint(edit3.Text)));
MK_LBUTTON, MAKELONG(nx,ny)) ;
//timer4.Enabled:=true;
timer9.Enabled:=true;
end;
这是我隐藏点击器里的代码,点击器是在不影响正常用户隐藏运行的,以上代码是不是没有模拟真实鼠标行为,拜求高人帮忙把这一步修改成模拟鼠标点击吗?
让我复制进去直接能用的。 展开
begin
form1.Caption:='点击';
timer3.Enabled:=false;
SendMessage(GetWindow(GetWindow(WebBrowser1.Handle, GW_CHILD), GW_CHILD),WM_LBUTTONDOWN,
////MK_LBUTTON, MAKELONG(strtoint(edit2.Text),strtoint(edit3.Text)));
MK_LBUTTON, MAKELONG(nx,ny));
sleep(500);
SendMessage(GetWindow(GetWindow(WebBrowser1.Handle, GW_CHILD), GW_CHILD),WM_LBUTTONUP,
////MK_LBUTTON, MAKELONG(strtoint(edit2.Text),strtoint(edit3.Text)));
MK_LBUTTON, MAKELONG(nx,ny)) ;
PostMessage(GetWindow(GetWindow(WebBrowser1.Handle, GW_CHILD), GW_CHILD),WM_LBUTTONDOWN,
////MK_LBUTTON, MAKELONG(strtoint(edit2.Text),strtoint(edit3.Text)));
MK_LBUTTON, MAKELONG(nx,ny));
sleep(500);
PostMessage(GetWindow(GetWindow(WebBrowser1.Handle, GW_CHILD), GW_CHILD),WM_LBUTTONUP,
////MK_LBUTTON, MAKELONG(strtoint(edit2.Text),strtoint(edit3.Text)));
MK_LBUTTON, MAKELONG(nx,ny)) ;
//timer4.Enabled:=true;
timer9.Enabled:=true;
end;
这是我隐藏点击器里的代码,点击器是在不影响正常用户隐藏运行的,以上代码是不是没有模拟真实鼠标行为,拜求高人帮忙把这一步修改成模拟鼠标点击吗?
让我复制进去直接能用的。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询