hollycrab Posted January 11, 2016 Share Posted January 11, 2016 Hi All,I just starting to learn using AutoIt.I'm trying to get the HTML document in an embeded Internet Explorer_Server in a windows application.Below is the code I used : var topLevelWindow = AutoItX.WinGetHandle("[CLASS:TMainFrm]"); if (topLevelWindow == IntPtr.Zero) { //MessageBox.Show(string.Format("Could not find a top level window with '{0}' in its name.", // TopLevelWindowSubstring)); return null; } IntPtr ieWindow = IntPtr.Zero; EnumChildWindows(topLevelWindow, FindEmbeddedIEWindow, ref ieWindow); if (ieWindow == IntPtr.Zero) { //MessageBox.Show(string.Format("Could not find an IE window as a child of HWND 0x{0}.", // topLevelWindow.ToString("x"))); return null; } uint htmlGetObjectMessage = RegisterWindowMessage(WMHtmlGetObject); object documentObject; UIntPtr sendMessageResult = UIntPtr.Zero; SendMessageTimeout(ieWindow, htmlGetObjectMessage, UIntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_NORMAL, 10000, out sendMessageResult);Unfortunately I still unable to retrieve the HTML Document since it return me zero.Anyone know what I did wrong here ?Thanks in advance. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now