Jump to content
Sign in to follow this  

Internet Explorer Save Page

Recommended Posts

Okay, so I need to have autoit save a webpage for me 2x daily. I have the program written already and I have been using it for about 6 months as a scheduled task. I recently upgraded to IE7 and it seems to not want to save the page.

Here is the code I have been using that has recently stopped working:

;Run and open Internet Explorer to the site needed and saving.

; Run IE
Run("C:\Program Files\Internet Explorer\iexplore.exe [url=http://www.mysitename.com/foldername/filename.asp")]http://www.mysitename.com/foldername/filename.asp")[/url]

; We wait the webpage here
WinWaitActive("http://www.mysitename.com/foldername/filename.asp - Microsoft Internet Explorer")

; Save it

$blah = InetGet("http://www.mysitename.com/foldername/filename.asp",@MyDocumentsDir & "\" & @year & "-" & @MON & "-" & @MDAY & "--" & @HOUR & @MIN & ".html")

; Now quit by pressing Alt-f and then x (File menu -> Exit)

It seems to me that the upgrade to IE7 has stopped this particular function from working. The alt+f function still brings up the file menu and letter code for save page is still the same.

Does anyone have any suggestions that they can offer? Thank you.

Edited by mrdragon

Share this post

Link to post
Share on other sites

How about something more simple

While @InetGetActive
  TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16)

FileMove(@ScriptDir & "\48822.html", @MyDocumentsDir & "\" & @year & "-" & @MON & "-" & @MDAY & "--" & @HOUR & @MIN & ".html")

I only started using AutoIT a few days back so may not be best solution

Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post

Link to post
Share on other sites

I might be really stupid here but if your code sample is correct it wont get past the wait.

WinWaitActive("http://www.mysitename.com/foldername/filename.asp - Microsoft Internet Explorer")

as IE v7 now has the title of "Windows Internet Explorer" easily overlooked but a pain as all scripts need recoding. Your wait would be.

WinWaitActive("http://www.mysitename.com/foldername/filename.asp - Windows Internet Explorer")

To get around this for future upgrades just


Also read help on WinTitleMatchMode as long as you have not changed it then the default does not need an exact title just matching it to the beginning

Hope this helps!


Share this post

Link to post
Share on other sites

The IE functions would be very good at this....

#include <IE.au3>

$url = "www.mysitename.com/foldername/filename.asp"
$oIE = _IECreate($url, 1)
$oIE.document.execCommand ("SaveAs") ; or _IEAction($oIE, "saveas")
; then navigate to wherever you want to save it, then save it
$oIE.quit ; or _IEAction("quit")
Edited by mikehunt114

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...