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