Herb191 Posted January 9, 2007 Posted January 9, 2007 I have written a small script that utilizes the InetGet function. It works great with one exception, sometimes when it saves the html file to my computer it saves the web page that loads before the one I need. It usually says something like please while this page is loading. Is there any way to stop this from happening? Thanks!
Valuater Posted January 9, 2007 Posted January 9, 2007 If you make use of the IE.au3 tools available in Autoit 3.2.+++ it has a load-wait built in for this type of scenario 8)
Herb191 Posted January 9, 2007 Author Posted January 9, 2007 Apparently I'm not using the right syntax for the _IELoadWait could you give me an example of how you would use it to download an html?If you make use of the IE.au3 tools available in Autoit 3.2.+++ it has a load-wait built in for this type of scenario8)
Herb191 Posted January 10, 2007 Author Posted January 10, 2007 Anyone? Ive read all the help files I could find as well as searching old posts. I have been working on this all day with out any luck. Any help would be greatly appreciated.
herewasplato Posted January 10, 2007 Posted January 10, 2007 (edited) you might want to post the URL link so that other can work with it... Edited January 10, 2007 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
Herb191 Posted January 10, 2007 Author Posted January 10, 2007 An example of one of the links is http://isbn.nu/0345483545The last number changes depending on what IBSN I am looking for. Sometimes it will go right to the page I need and other times I will get the Please wait We're still waiting for a response from 5 bookstores...So the code right now looks something like this:$IBSNNumber = (0345483545)#include <IE.au3>InetGet("http://isbn.nu/" & $IBSNNumber, "C:\barcode.html", 1, 0)
herewasplato Posted January 10, 2007 Posted January 10, 2007 (edited) Just by way of testing several IBSN numbers, I chopped of the last two digits from the ISBN in your post and made a sample script that loops thru several ISBN numbers. The Do/Until loop will not quit trying until it gets some page other than the "waiting one" that you mentioned. Global $i For $i = 10 To 45 _GetIt("03454835" & $i) Next Func _GetIt($IBSNNumber) Do InetGet("[url="http://isbn.nu/"]http://isbn.nu/[/url]" & _ $IBSNNumber, "barcode" & $i & _ ".html", 1, 0) Until Not StringInStr(FileRead("barcode" & _ $i & ".html"), "still waiting for a response from") EndFunc ;==>_GetIt There is probably a better way to do this, but this worked everytime for me. Edited January 10, 2007 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
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