c# – CEF模拟Mousedown和Keysend

我想使用CEF来控制Flash Applikation,因此我需要一个模拟MouseDown和KeySend Execute而不需要Javascript.我搜索得非常多,但我没有找到剪辑.只是一些尝试(屏幕外):

    managedCefBrowserAdapter.OnMouseButton(500, 500, 0, true, 2, CefEventFlags.LeftMouseButton); 

要么

    MouseEvent a = new MouseEvent();a.Modifiers = CefEventFlags.LeftMouseButton;a.X = 500;a.Y = 500;

要么

managedCefBrowserAdapter.SendKeyEvent(0, 0, 0);

没有什么对我有用:(,谢谢你的帮助:)

解决方法:

这段代码适合我.点击位置0,0(左上角)

browser.GetBrowser().GetHost().SendMouseClickEvent(0, 0, MouseButtonType.Left, false, 1, CefEventFlags.None);
System.Threading.Thread.Sleep(100);
browser.GetBrowser().GetHost().SendMouseClickEvent(0, 0, MouseButtonType.Left, true, 1, CefEventFlags.None);
上一篇:c# – CefSharp是多线程的吗?


下一篇:c# – CefSharp – 无法加载文件或程序集“CefSharp.Core.dll”或其依赖项之一