我正在使用 awesomium,并且正在尝试使用命令“InjectMouseDown”。不幸的是,什么也没发生。我正在尝试使用以下代码:
private void newbrowser()
{
dir = "C:\\AwCache\\" + RandomString(10);
_webView = WebCore.CreateWebView(800, 600);
_webView.ParentWindow = this.Handle;
using (WebSession session = WebCore.CreateWebSession(dir, new WebPreferences() { /*CustomCSS = "body { zoom: 75%; }", ProxyConfig = proxyok,*/ }))
{
_webView.Source = new Uri("http://www.google.com");
_webView.DocumentReady += WebViewOnDocumentReady;
}
}
private void WebViewOnDocumentReady(object sender, UrlEventArgs urlEventArgs)
{
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
_webView.InjectMouseMove(5, 100);
_webView.InjectMouseDown(MouseButton.Left);
}