phaze424 Posted February 11, 2008 Share Posted February 11, 2008 (edited) I've been using AutoIt3 for a few months now, but have only browsed the forums; I've never posted anything. However, I have a question: How can I save the current HTML from an InternetExplorer object? Normally, I would use InetGet(), but I'm trying to use PageScrape to scrape the page. The page requires me to log in (cookies, etc; most of you know what I'm talking about, so I won't go into it in depth.) Here's what I have so far:Global $IEObject = ObjCreate("InternetExplorer.Application") $IEObject.Navigate("http://www.somesite.com/login.php") While $IEObject.Busy Sleep(200) WEnd $IEObject.document.getElementById("user").Value = "AutoIt3" $IEObject.document.getElementById("pass").Value = "KicksAss" $IEObject.document.getElementById("LoginForm").Submit() Sleep(5000) While $IEObject.Busy Sleep(200) WEnd ; Do something $IEObject.Quit()I tried $IEObject.document.ExecCommand("SaveAs", 0, "SomePath"), but my script just hung. If I can't this to work, perhaps someone knows of a way to find the file corresponding to a specific URL in the cache, thus allowing me to use the ultimate powers of the copypasta? Thanks in advance for the help!EDIT: I feel like an idiot. Just a couple minutes after posting this, I realized that I could just use $IEObject.document.Body.innerHTML. The topic can be locked, I suppose. I bet this first post gave you a great impression... Edited February 11, 2008 by phaze424 Link to comment Share on other sites More sharing options...
DW1 Posted February 11, 2008 Share Posted February 11, 2008 I bet this first post gave you a great impression... Welcome to the forums, and trust me, there are WAY worse first posts all over the place. AutoIt3 Online Help 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