
function WebPreview_Navigate(strURL) {
var wndEmeditor = shell.FindWindow("EmEditorMainFrame3", "" );
var wndEEPaneContainer;
try {
wndEEPaneContainer = wndEmeditor.FindWindow("EEPaneContainer", "");
} catch(e) {
editor.ExecuteCommandByID(5632+9); Sleep(100);
wndEEPaneContainer = wndEmeditor.FindWindow("EEPaneContainer", "");
}
var wndEmEditorWebPreview = wndEEPaneContainer.FindWindow("EmEditorWebPreview", "");
var wndShellEmbedding = wndEmEditorWebPreview.FindWindow("Shell Embedding", "");
var wndShellDocObjectView = wndShellEmbedding.FindWindow("Shell DocObject View", "");
var wndInternetExplorerServer = wndShellDocObjectView.FindWindow("Internet Explorer_Server", "");
var com = new ActiveXObject("CrowdyEmeditorCom.WebPreviewController");
var Browser2 = com.GetIEBrowser(wndInternetExplorerServer.hWnd);
if (Browser2 != null) {
Browser2.Navigate(strURL);
} else {
alert('Browser2 is null.');
}
}
No comments:
Post a Comment