简体   繁体   English

模拟鼠标点击屏幕上的某个点

[英]Simulate mouse click at a point on screen

See figure image bellow For example, my cursor at black spot, but I want to simulate mouse click at red spot without moving my cursor to red spot. 例如,我的光标位于黑点,但我想模拟鼠标单击红点,而无需将光标移动到红点。 How ? 怎么样 ?

http://i.imgur.com/IujXeYd.png http://i.imgur.com/IujXeYd.png

  1. Scan through the bitmap and find the red spot using Bitmap.GetPixel() . 扫描位图,并使用Bitmap.GetPixel()找到红点。
  2. Invoke mouse click using SendKeys 使用SendKeys调用鼠标单击

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM