0
鼠标点击有两种常见类型:“单击”或“双击”。
例如,该代码将模拟鼠标点击:如何在屏幕C上的特定位置模拟四键鼠标事件#
private const UInt32 MOUSEEVENTF_LEFTDOWN = 0x0002;
private const UInt32 MOUSEEVENTF_LEFTUP = 0x0004;
[DllImport("user32.dll")]
private static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData,uint dwExtraInf);
private void button3_Click(object sender, EventArgs e)
{
int x = 450;//set x position
int y = 250;//set y position
Cursor.Position = new Point(x, y);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);//make left button down
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);//make left button up
}
的原因,我的问题:在Adobe Acrobat Reader:
- 单一的鼠标点击>>>会放置光标
- 双击>>>将选择一个单词
- 三重点击>>>将选择整单线
- 四鼠标点击>>>将在该页面中选择的所有文本
- Ctrl + A >>>选择此文件中的所有文本(在所有页面中)。
(请注意,5次点击不会做任何事情,只是取消选择。)
UPDATE
我发现了一个简单的解决方案:
private void button2_Click(object sender, EventArgs e)
{
button3.PerformClick(); // Single mouse click
button3.PerformClick(); // Double mouse click
button3.PerformClick(); // Triple mouse click
button3.PerformClick(); // Quadrilateral mouse click
}
鼠标双击 https://plus.google.com/u/0/105821605186922664636/posts/125TLBLdicB –
三重鼠标点击https://plus.google.com/u/0/105821605186922664636/posts/8h5bFgL3Ea7 –
“四击”是您想要的术语。您向我们展示您的“简单解决方案” - 当您尝试该解决方案时会发生什么?你还试过了什么? – SlimsGhost